最近在新的应用更新后,我们开始崩溃
let sourceApplication = options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String
在以下代码中。我只是想知道为什么它可以是零或因为as而崩溃!字符串?
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey: Any] = [:]) -> Bool {
CoreAnalytics.shared.record("AppDelegate", action: "Open URL")
Branch.getInstance().handleDeepLink(url)
let sourceApplication = options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String
let annotation = options[UIApplicationOpenURLOptionsKey.annotation]
CleverTap.sharedInstance()?.handleOpen(url, sourceApplication: sourceApplication)
return
GIDSignIn.sharedInstance().handle(url, sourceApplication: sourceApplication, annotation: annotation) ||
FBSDKApplicationDelegate.sharedInstance().application(app, open: url, sourceApplication: sourceApplication, annotation: annotation)
}
答案 0 :(得分:0)
这是从Apple钱包通行证打开应用程序时发生的。