AppDelegate and SceneDelegate when supporting iOS 12 and 13

后端 未结 3 725
忘掉有多难
忘掉有多难 2020-12-10 05:12

I need to support iOS 12 and iOS 13.

Should I be duplicating code between AppDelegate and SceneDelegate?

For example:



        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 05:47

    Xcode 11.* and Swift 5.*

    Follow the steps given below after that your code will work fine for both iOS 12 and iOS 13 -

    1. Remove the scene manifest from info.plist file
    2. Remove scene delegate
    3. Add window property inside the AppDelegate
    4. Remove all the methods(2 methods mostly) related to the scene from AppDelegate

    Hope this will work for someone. Happy Coding

提交回复
热议问题