我有以下代码:
let storageRef = FIRStorage().reference(forURL: "gs://slugbug-....appspot.com") // dots intentional
let imageRef = storageRef.child("testImage.jpg")
但应用程序崩溃了,我收到以下消息:
由于未捕获的异常而终止应用程序
'NSInvalidArgumentException',原因:'提供的存储桶:
slugbug-...appspot.com 与 的存储桶不匹配
当前实例:(空)'
即使我使用
let storageRef = FIRStorage().reference()
桶为零。
Why?
你失踪了.storage()
.
检查你的线路。它应该是:
let storageRef = FIRStorage.storage().reference(forURL: "gs://slugbug-....appspot.com") // dots intentional
希望能帮助到你
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)