gpt4 book ai didi

swift - 使用未声明的类型 'DynamicLink'

转载 作者:行者123 更新时间:2023-11-28 05:50:13 26 4
gpt4 key购买 nike

突然,我收到错误 Use of undeclared type 'DynamicLink'是由什么引起的?该项目运行正常,只是无缘无故地开始运行。上次修改pods文件是在安装facebook sdk的时候。我正在使用 pod FirebaseDynamicLinks (3.1.1)

extension AppDelegate {

// - incoming urls can reach the app in 2 places:

// 1. for universal links we handle those incoming urls in AppDelegate in this method:
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
//check if there is an incoming url
if let incomingURL = userActivity.webpageURL {

//parse dynamic linkUrl into a dynamic link object
let linkHandled =

DynamicLinks.dynamicLinks().handleUniversalLink(incomingURL, completion: {[weak self] (dynamiclink: DynamicLink?, error: Error?) in

guard let strongSelf = self else {return}
if let dynamiclink = dynamiclink,
let _ = dynamiclink.url {
strongSelf.handleIncomingDynamicLink(dynamiclink)
} else{
//Else check for errors
print("error in App Delegate \(error?.localizedDescription)")
}
})
return linkHandled
}
return false //since I've got nothing that could handle this activity
}
}


Using Alamofire (4.2.0)
Using AlamofireObjectMapper (4.1.0)
Using Bolts (1.9.0)
Using FBSDKCoreKit (4.38.0)
Using FBSDKLoginKit (4.38.0)
Using FBSDKMessengerShareKit (1.3.2)
Using FBSDKShareKit (4.38.0)
Using FacebookCore (0.5.0)
Using FacebookLogin (0.5.0)
Using FacebookShare (0.5.0)
Using Firebase (5.11.0)
Using FirebaseAnalytics (5.3.0)
Using FirebaseAnalyticsInterop (1.1.0)
Using FirebaseAuth (5.0.4)
Using FirebaseAuthInterop (1.0.0)
Using FirebaseCore (5.1.6)
Using FirebaseDatabase (5.0.3)
Using FirebaseDynamicLinks (3.1.1)
Using FirebaseInstanceID (3.3.0)
Using FirebaseMessaging (3.2.1)
Using FirebaseStorage (3.0.2)
Using FirebaseUI (5.2.0)
Using GTMSessionFetcher (1.2.0)
Using GeoFire (3.0.0)
Using GoogleAppMeasurement (5.3.0)
Using GoogleUtilities (5.3.4)
Using ObjectMapper (2.2.9)
Using PCAiOSLib (1.0.3)
Using Protobuf (3.6.1)
Using leveldb-library (1.20)
Using nanopb (0.3.901)
Using pop (1.0.10)

enter image description here

最佳答案

你可以试试

let linkHandled  = DynamicLinks.dynamicLinks().handleUniversalLink(incomingURL) { (dynamiclink, error) in
// ...
}

关于swift - 使用未声明的类型 'DynamicLink',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53231047/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com