小编Wah*_*din的帖子

不推荐使用'downloadURL()':使用`StorageReference.downloadURLWithCompletion()`获取当前的下载URL.

Storage.storage().reference().child(ImageUid).putData(ImageData, metadata: metadata) { (metadata, error) in
            if error != nil {
                print("Couldn't Upload Image")
            } else {
                print("Uploaded")
                let downloadURl = metadata?.downloadURL()?.absoluteString
                if let url = downloadURl {
                    self.SetUpUser(Image: url)
                }
            }
        }

    }
}
Run Code Online (Sandbox Code Playgroud)

错误:

不推荐使用'downloadURL()': StorageReference.downloadURLWithCompletion()用于获取当前下载URL.

我该如何解决?

xcode ios firebase-realtime-database firebase-storage

0
推荐指数
1
解决办法
2641
查看次数