我刚刚将Firebase Storage更新为5.0.0,看来metadata.downloadURL()不再被认可了。(Value of type 'StorageMetadata' has no member 'downloadURL')
metadata.downloadURL()
Value of type 'StorageMetadata' has no member 'downloadURL'
尽管在查阅文档之后,它仍然应该可用:
https://firebase.google.com/docs/reference/swift/firebasestorage/api/reference/Classes/StorageMetadata#/c:objc(cs)FIRStorageMetadata(im)downloadURL
该项目已经清理和重建。
我想念什么吗?
你能试一下吗
// Create a reference to the file you want to download let starsRef = storageRef.child("images/stars.jpg") // Fetch the download URL starsRef.downloadURL { url, error in if let error = error { // Handle any errors } else { // Get the download URL for 'images/stars.jpg' } }