Normally I am updating image with url to firebase storage with:
Storage.storage().reference().child("profile_images").child(fileName).putData(uploadData, metadata: nil) {
[weak self] (metadata, err) in
guard let strongSelf = self else {
return
}
if let err = err {
print(err)
}
guard let profileImageUrl = metadata?.downloadURL()?.absoluteString else {
return
}
ProfilePhotoHandler.Instance.addPhotoUrl(withUrl: profileImageUrl)
}
But right now Xcode 9.3
show warning:
downloadURL()' is deprecated: Use `StorageReference.downloadURLWithCompletion()
Firebase docs still shows old way. Does anyone can help me how to handle it now?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…