我剛剛將Firebase Storage更新到5.0.0,它看起來metadata.downloadURL()已經(jīng)不再被識別了。(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該項目已經(jīng)清理和重建。我錯過了什么嗎?
3 回答

慕妹3146593
TA貢獻1820條經(jīng)驗 獲得超9個贊
你能試一下嗎
// 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'
}
}
- 3 回答
- 0 關注
- 612 瀏覽
添加回答
舉報
0/150
提交
取消