swift – FBSDKApplicationDelegate应用程序openURL:sourceApplication:已弃用注释

swift – FBSDKApplicationDelegate应用程序openURL:sourceApplication:已弃用注释,第1张

概述与iOS9应用程序openURL:sourceApplication:不推荐使用注释 func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool { return FBSDKApplicationDel 与iOS9应用程序openURL:sourceApplication:不推荐使用注释
func application(application: UIApplication,openURL url: NSURL,sourceApplication: String?,annotation: AnyObject?) -> Bool {    return FBSDKApplicationDelegate.sharedInstance().application(application,openURL: url,sourceApplication: sourceApplication,annotation: annotation)}

所以现在我们应该用;

func application(app: UIApplication,options: [String : AnyObject]) -> Bool {}

FBSDKApplicationDelegate为sourceApplication参数(String)设置什么

func application(app: UIApplication,options: [String : AnyObject]) -> Bool{    return FBAppCall.handleOpenURL(url,sourceApplication: options["UIApplicationopenURLOptionsSourceApplicationKey"] as! String)}

如果您的SDK通行证中的注释参数为nil

新SDK

let sourceApplication: String? = options[UIApplicationopenURLOptionsSourceApplicationKey] as? String    return FBSDKApplicationDelegate.sharedInstance().application(app,annotation: nil)

更新2017/04/06:Xcode 8.3,FBSDKCoreKit 4.20.2

func application(_ app: UIApplication,open url: URL,options: [UIApplicationopenURLOptionsKey : Any] = [:]) -> Bool {    let sourceApplication: String? = options[UIApplicationopenURLOptionsKey.sourceApplication] as? String    return FBSDKApplicationDelegate.sharedInstance().application(app,open: url,annotation: nil)}
总结

以上是内存溢出为你收集整理的swift – FBSDKApplicationDelegate应用程序openURL:sourceApplication:已弃用注释全部内容,希望文章能够帮你解决swift – FBSDKApplicationDelegate应用程序openURL:sourceApplication:已弃用注释所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1052187.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存