Cause of [ApplicationLifecycle] Windows were created before application initialzation completed. console message.

My universal iOS app displays the message "[ApplicationLifecycle] Windows were created before application initialzation completed.

This may result in incorrect visual appearance." right at the start of launch - before didFinishLaunchingWithOptions is reached.

The app does not crash although there is an issue later where a screen is unexpectedly blank - not sure why. The app does not display this message on an iPhone. The iPad uses a splitviewcontroller (actually a custom one). It is written in objective-C with a mainWindow.xib, as opposed to storyboard. Can anyone offer any suggestions as to how to determine what is causing this issue.

Replies

Hi,


I am getting the same thing on app I am upgrading from swift 1 and some Objective C ones. No Idea what this is.

I get this along with a crash on iPad running iOS 11. The app works perfectly well on iPads with iOS 10. I've submitted a bug report to Apple.


Hundreds of my users are reporting crashes on this app designed to run on iOS 9.3 or better. No response from Apple yet.

Same problem: Xcode 11.4.1, iOS 13.4.1, app set available from iOS 8.0, running on actual iPhone.


Seems to result in blank or misconfigured table cells on 1st launch, but:

- blank cell is resolved on subsequent launches, and

- misconfigured cells are resolved upon scrolling down then back up.


I also converted from Objective-C to Swift and now am getting this message. Hmm... something in the background with loading a xib hanging around?


-----

Update:

I deleted the `Launch Code.xib`, cleaned everything, and rebuilt. I haven't seen the error again so far...


Note: I made sure the `Launch Screen.storyboard` was selected in the target's `Launch Screen` setting, and that the `main.storyboard` was selected for the Deployment->Main Interface setting before deleting/rebuilding.