We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:])
方法中的:
urlKey:String = options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String
在iOS13中会闪退 原因是空对象强制解包. 解决方法:
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { if let urlKey:String = options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String { if urlKey == "com.tencent.xin" { // 微信 的回调 return LDWechatShare.handle(url) } else if urlKey == "com.tencent.mqq" { // QQ 的回调 return LDTencentShare.handle(url) } else if urlKey == "com.sina.weibo" { // 新浪微博 的回调 return LDSinaShare.handle(url) } } if url.absoluteString.hasPrefix("tencentxxxxxxxxx") { // qq return LDTencentShare.handle(url) }else if url.absoluteString.hasPrefix("wbxxxxxxx") { // weibo return LDSinaShare.handle(url) }else if url.absoluteString.hasPrefix("wxxxxxxxxxx") { // wexin return LDWechatShare.handle(url) } return true }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
方法中的:
在iOS13中会闪退
原因是空对象强制解包.
解决方法:
The text was updated successfully, but these errors were encountered: