我刚刚将Firebase Storage更新到5.0.0,它看起来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该项目已经清理和重建。我错过了什么吗?
3 回答
慕妹3146593
TA贡献1820条经验 获得超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 关注
- 586 浏览
添加回答
举报
0/150
提交
取消