Closed capumanGib closed 5 years ago
Storage Metadata has been depricatied this stack overflow answer is the new way to make it work the problem is hard to find because firebase didn't update their docs yet. https://stackoverflow.com/a/50464820/9830365 as far as uid and send email verification I haven't used it from authdataresult i get the uid like this let userID = Auth.auth().currentUser?.uid if i find something on email verification ill send it your way
Any updates, Hector?
Did you try to do this?
Auth.auth().currentUser?.sendEmailVerification { (error) in // ...error do code here }
Hey guys, just a passer by, but here's the changes and their fixes.
1. Value of type 'StorageMetadata' has no member 'downloadURL'
Original code:
if let imageDownloadUrl = metadata?.downloadURL()?.absoluteString {
*handle url*
}
New code:
storageRef.downloadURL(completion: { (url, error) in
if let imageDownloadUrl = url {
*handle url*
})
2. Value of type 'AuthDataResult' has no member 'sendEmailVerification'
Original code: No idea, never used this ;)
New code:
guard let result = user else {
return
}
result.user.sendEmailVerification...
3. Value of type 'AuthDataResult' has no member 'uid'
Original code:
guard let uid = user?.uid else {
return
}
New code:
guard let result = user else {
return
}
let uid = result.user.uid
Hope this helps!
Ed
i don't fix problem hicccc
Hi guys,
Awesome project! I've added the firebase stuff, updated with cocoapods etc, but when i try to compile the project i get 3 errors: Value of type 'StorageMetadata' has no member 'downloadURL' Value of type 'AuthDataResult' has no member 'sendEmailVerification' Value of type 'AuthDataResult' has no member 'uid'
Anyone know how to solve those issues?
Tanks