idleTimerDisabled not working under iOS8 Gold Master - ios8

We have a video recording app which has worked fine under iOS6 and 7 and we thought it was working fine under the beta versions of iOS8. Since we have the Gold Master we are often pushed to the background when the iOS idle timer kicks in. We have the line:
[UIApplication sharedApplication].idleTimerDisabled = YES;
in our code and this has been sufficient until now. Does anyone know why this is not working all of a sudden.
Thanks

If you show a keyboard and dismiss keyboard after setIdieTimerDisabled, the idleTimerDisabled will not work automatically on iOS 8.
I don't know why, but these code could fix my problem:
- (void)onKeyboardDidHide:(NSNotification *)notification
{
if (!SystemVersionLessThan(#"8.0")) {
//reset it again.
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
}
}

Related

Apple Watch App Only Showing Clock

Xcode states that the Apple Watch is running but yet I only see the clock. My storyboard interface should have a green background. There is nothing showing up in the slog.
- (void)awakeWithContext:(id)context {
[super awakeWithContext:context];
NSLog(#"hello world");
}
After deleting and re-adding the storyboard into the app section, the NSLog now shows results again and the apple watch is showing the storyboard again.

InputAccessoryView does not show on iOS 8 simulator

I have iOS application since iOS 5, it includes a custom UITextView which use its own inputView and inputAccessoryView. It works with iOS 7 simulator, when it becomeFirstResponse, both inputView and inputAccessoryView show, but with iOS 8 simulator, only associated inputView shows, the inputAccessoryView does not show.
I am using Xcode 6 GM seed
HeInput_TextView.m
- (void)awakeFromNib
{
self.text = #"";
heKeyboard4x5 = [[HeKeyboard_ViewController alloc] init];
inputAccessoryVC = [[InputAccessory_ViewController alloc] init];
self.inputView = heKeyboard4x5.view;
self.inputAccessoryView = inputAccessoryVC.view;
}
Is it a bug in iOS 8 simulator or a change for iOS 8?
Edit:
I found more information about this problem.
This problem happens in Page-Based application, if an UITextView in a page of UIPageViewController, then the UITextView.inputAccessoryView doesn't show at iOS 8 simulator, but shows in iOS 7.1 simulator.
I creates two projects: 'Single-View Based application' and 'Page-Based application', and confirmed the problem happens as described above.
it is new behaviour of simulators in xcode 6. to see your custom accessory view or even default one try to uncheck hardware -> simulator -> connect harware keyboard.
It's an iOS8 bug.
You can reproduce it on the simulator in Apple's Contacts App.
Add a new contact and scroll down to "add a date".
Same problem. A colleague has raised an apple rdar.
I've found view accessories in iOS8 don't use the view's frame to offset their height above your InputView (or even the default software keyboard).
You might need to make sure your inputAccessoryView implements
-(CGSize)intrinsicContentSize
eg:
#implementation InputAccessory_View
// .. your code ...
-(CGSize)intrinsicContentSize{
return self.frame.size;
}
#end
My apologies, I misread the item. I've been driven batty by iOS8's keyboard issues.

Autolayout adjusts perfect in iOS 7 but not in iOS 6

I have a view in my app that is in landscape and I have set upp the UI in my storyboard so it responds as I want to different screen sizes. Now this works exactly as I want in iOS 7 but when I ran it the app in iOS 6 it is like it's not responding to my storyboard settings:
My app is mainly in portrait so this view in the app is set in landscape by subclassing the navigation controller:
// CustomNavigationLandscapeViewController.m
- (BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
- (BOOL)shouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
So is there something that I'm doing wrong to get this behavior? Why does it work perfectly in iOS 7 but not in iOS 6?
After restarting Xcode and doing a clean the problem was solved. Guess it just was a glitch in Xcode that came in an inappropriate time.

iOS Simulator has black Keyboard and Alerts in iOS7

My App runs on iOS 6 and 7, on the devices it looks fine and on the simulator iOS6 it is fine but in iOS7 all alerts, keyboards and parts of table and collection views have elements that are completely black. They are there if you clock on them. It is hard to explain but you can see from the image.
I think it is do with the fact that I run a lot of things in the background and when I do any UI and force to the main thread (but this could be a red herring).
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^(void)
{
[self backgroundbits];
....
....
dispatch_sync(dispatch_get_main_queue(), ^
{
[self updateProgressBar];
});
....
....
....
});
Another options is that I have messed up the transparency and tint somehow.
It is just strange it ONLY does it on the iOS 7 simulator.
I have experienced this before. I just resorted the simulator (iOS Simulator > Restore Content and Settings), cleaned my Xcode Project, and quit and reopened Xcode. This solved the problem for me!

iOS 6 navigation - do I have to use storyboards?

I have an app that is working fine for iOS 5, I've just installed the iOS 6 simulator and my navigation is no longer working at all. Also my viewWillAppear and viewDidAppear methods are no longer firing.
I'm using [self.navigationController pushViewController:vc animated:YES]; to navigate. Do I have to use StoryBoards to navigate in iOS 6?
Thanks
No, Storyboards are optional and have been around since iOS 5.0. If your navigation is broken it'll be due to errors in your code.

Resources