iOS App shows blank screen after migrating to SwiftUI Lifecycle

This question was originally posted to StackOverflow, but I found it more suitable to be placed here.

Was working on migrating one of my app from AppDelegate lifecycle to SwiftUI lifecycle according to this question.

After following all the steps, The simulator simply shows a blank screen (the app does not launch at all):

There is no log in the console. However, if the app is removed from the simulator (or device) and reinstalled, it will launch the new SwiftUI lifecycle correctly. So there seems to be some problem with scene caching that causes iOS to be confused after the migration.

Am I missing something during the migration?

Replies

I ran into this problem when updating app from SceneDelegate to App lifecycle. After much trial and error, this setting in info.plist fixed the issue:

  • Thanks. This worked for me.

Add a Comment