xcode12

How to convert from UIKit life cycle to SwiftUI life cycle in iOS 14 (Xcode 12 Beta)

孤者浪人 提交于 2020-08-23 05:45:24
问题 I am currently working on SwiftUI app in which I am using SceneDelegate and AppDelegate . I would like to know how I can convert the life cycle from UIKit to SwiftUI one where there is an App struct and with scenes etc. Also I would like to know how to cater for CoreData and PersistentContainers and inject these into our environments. Also I have used UIApplicationDelegateAdapter to inject AppDelegate but the @main is giving me error 'main()' is only available in iOS 14.0 or newer I am using

How to convert from UIKit life cycle to SwiftUI life cycle in iOS 14 (Xcode 12 Beta)

纵然是瞬间 提交于 2020-08-23 05:42:13
问题 I am currently working on SwiftUI app in which I am using SceneDelegate and AppDelegate . I would like to know how I can convert the life cycle from UIKit to SwiftUI one where there is an App struct and with scenes etc. Also I would like to know how to cater for CoreData and PersistentContainers and inject these into our environments. Also I have used UIApplicationDelegateAdapter to inject AppDelegate but the @main is giving me error 'main()' is only available in iOS 14.0 or newer I am using