gpt4 book ai didi

swift - 类型 'StorageMetadata' 的值没有成员 'downloadURL'

转载 作者:行者123 更新时间:2023-11-30 11:21:38 27 4
gpt4 key购买 nike

我刚刚将 Firebase Storage 更新到 5.0.0,但 metadata.downloadURL() 似乎不再被识别。 (“StorageMetadata”类型的值没有成员“downloadURL”)

尽管查看文档后它应该仍然可用:

https://firebase.google.com/docs/reference/swift/firebasestorage/api/reference/Classes/StorageMetadata#/c:objc(cs)FIRStorageMetadata(im)downloadURL

该项目已经清理和重建。

我错过了什么吗?

最佳答案

你能试试Google Firebase docs

// 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'
}
}

关于swift - 类型 'StorageMetadata' 的值没有成员 'downloadURL',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51209931/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com