根据我的应用程序项目设置,\n我使用相同的代码进行以下函数调用,以分别在 SceneDelegate 和 AppDelegate 中实例化 rootVC
\nfunc scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {\n\n}\n\xe2\x80\xa8func application(_ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]?)\n -> Bool {\n}\xe2\x80\xa8\nRun Code Online (Sandbox Code Playgroud)\n\xe2\x80\xa8\xe2\x80\xa8为了实现通用链接,我在我的 App Delegate\xe2\x80\xa8\xe2\x80\xa8 中有以下回调函数
\nfunc application(_ application: UIApplication,\n continue userActivity: NSUserActivity,\n restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {\n//code to capture and setup universal link\n}\nRun Code Online (Sandbox Code Playgroud)\n\xe2\x80\xa8AppDelegate 中的这个函数仅在低于 iOS 13 的设备中调用。我寻找了 SceneDelegate 的类似回调等效项,我能找到的最接近的是这个函数。\xe2\x80\xa8\xe2\x80\xa8
\nfunc scene(_ scene: UIScene, continue userActivity: NSUserActivity) {\n//code to capture and setup universal link\n}\nRun Code Online (Sandbox Code Playgroud)\n …