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?

Answered by jbaraga in 696774022

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:

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:

In case anyone comes across this looking for help, take a look at this article: Migrating to the SwiftUI life cycle

iOS App shows blank screen after migrating to SwiftUI Lifecycle
 
 
Q