Is it possible to migrate an old Xcode project to use SwiftUI?

后端 未结 3 1058
梦如初夏
梦如初夏 2020-12-08 21:11

I have an app made in Xcode 10 using Main.storyboard and would like to migrate it to use Apple\'s new framework: SwiftUI.
Is that already possible?

I have alrea

3条回答
  •  轮回少年
    2020-12-08 21:39

    My solution turned out to be different. In my case, I had everything in place, but when the code attempted to load the UISceneConfiguration, it failed to load the config in the Info.plist and gave me a secondary window config instead with no scene delegate set. If I asked for the correct configuration from the debug console it would load as expected. I was confused.

    I double checked everything and tried all of the suggestions here but none worked. In the end I did 'Hardware' - 'Erase all contents and settings...' on the simulator and that solved it.

    My guess is that because I'd been running the pre-SwiftUI version of the app on the simulator, something in that caused the SwiftUI version to behave differently.

提交回复
热议问题