black screen after switching to UIKit app lifecycle

I had to switch from the SwiftUI app lifecycle to the UIKit lifecycle due to this issue: https://developer.apple.com/forums/thread/742580

When I switch to UIKit I get a black screen on startup. It's the inverse of this issue: https://openradar.appspot.com/FB9692750

For development, I can work around this by deleting and reinstalling the app, but I can't ship an app that results in a black screen for users when they update.

Anyone know of a work-around?

I've filed FB13462315

I would recommend creating a new sample project using UIKit and seeing what parts are different from your app vs. the sample project. Some things that come to mind:

  • Do you have a LaunchScreen storyboard? Is that storyboard file configured correctly in the Info.plist?
  • Do you have a scene manifest section properly defined in your Info.plist? If you are using storyboards, is the initial storyboard properly configured?
  • Does your app have an initial window (either the window automatically created from your storyboard, or the window that should be created manually in your AppDelegate? Is this window being retained anywhere? You can try checking in the view debugger or LLDB whether or not your app has a window.
black screen after switching to UIKit app lifecycle
 
 
Q