applicationDidBecomeActive is firing much sooner in iOS 9 (beta 1 and 2). Previously viewDidLoad and viewWillAppear for the root view controller completed before applicationDidBecomeActive. Has anyone seen any documentation on this or heard from Apple on app life cycle changes?
applicationDidBecomeActive fires sooner?
3no, did you learn anything more about this?
This occurs for me as well, but only for my existing apps. It doesn't occur if I create a new Single View Application with Xcode 6.4 and try that same app in Xcode 7.0 beta 5 (in which case viewDidLoad gets called before applicationDidBecomeActive).
A sufficient workaround for me is to employ dispatch_async back to the main thread for the code that I want to have run in response to applicationDidBecomeActive but after viewDidLoad.
At this point, I suspect a bug with the way iOS handles older apps, so it may prove difficult to produce a minimal repro for a radar.
@Mike I'm having exactly the same problem with an older app in beta 5. Can you elaborate on your workaround using dispatch_async? I've not used it before, are you dispatching from the viewcontrollers viewDidLoad or from the app delegate?
I tried this same workaround and it worked for me. The code I used was the following:
dispatch_async(dispatch_get_main_queue(), ^{
Do stuff...:)
});I put the code in AppDelegate, as this is the code that needs to be delayed.
Thanks @mathiasm. That works for me too.