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
It's a correct only minor change
In SceneDelegate.swift
replace
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = UIHostingController(rootView: ContentView())
self.window = window
window.makeKeyAndVisible()
with
if let windowScene = scene as? UIWindowScene {
let window = UIWindow(windowScene: windowScene)
window.rootViewController = UIHostingController(rootView: ContentView())
self.window = window
window.makeKeyAndVisible()
}
TAKEN FROM HERE