Page 1 of 1

如何解决ios使用UISceneDelegate后语言技能UI业务包google授权跳回app进不去授权确认页面

Posted: 2025年 Feb 21日 17:03
by zerozheng

使用UISceneDelegate后,系统将不在走UIApplicationDelegate的 application(_:continue:restorationHandler:)方法,而是走了UISceneDelegate的scene(_:continue:)

因此在UISceneDelegate 中添加如下代码即可解决:

Code: Select all

func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
  if let impl = ThingSmartBizCore.sharedInstance().service(ofProtocol: ThingValueAddedServiceProtocol.self) as? ThingValueAddedServiceProtocol {
    impl.thing_application(UIApplication.shared, continue: userActivity) { restorableObjects in
      // Your code to handle restorable objects goes here
    }
  }
}