当我更新firebase pods时出现以下错误:
"消息"类型的值没有成员"remoteMessageDelegate"
//notification
if #available(iOS 10.0, *) {
let authOptions : UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization(
options: authOptions,
completionHandler: {_,_ in })
// For iOS 10 display notification (sent via APNS)
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
// For iOS 10 data message (sent via FCM)
Messaging.messaging().remoteMessageDelegate = self as? MessagingDelegate
}
Run Code Online (Sandbox Code Playgroud)
我怎么能解决这个问题?
我使用下面的代码,但当我更新代码和pods得到以下错误:
StorageMetadata'没有成员'downloadURL'
static func uploadVideoToFirebaseStorage(videoUrl: URL, onSuccess: @escaping (_ videoUrl: String) -> Void) {
let videoIdString = NSUUID().uuidString
let storageRef = Storage.storage().reference(forURL: Config.STORAGE_ROOF_REF).child("posts").child(videoIdString)
storageRef.putFile(from: videoUrl, metadata: nil) { (metadata, error) in
if error != nil {
ProgressHUD.showError(error!.localizedDescription)
return
}
if let videoUrl = metadata?.downloadURL()?.absoluteString {
onSuccess(videoUrl)
}
}
}
Run Code Online (Sandbox Code Playgroud)
我怎么能解决这个问题?
更新: