I was trying to upload an image in Swift Storage while trying to import FirebaseStorage, but I got an error Type 'Storage' has no member 'storege'

Asked 2 years ago, Updated 2 years ago, 36 views

Attempting to save the image
Type 'Storage' has no member 'storage' error when set to let storageRef=Storage.storage().reference().child("profile_image").child(fileName").
I have imported the Firebase module as follows, but please let me know if there is anything wrong.

import UIKit
import FirebaseAuth
import FirebaseFirestore
import FirebaseCore
import FirebaseStorage

swift

2022-09-30 19:47

1 Answers

It appears to be caused by a simple spelling error.st ege instead of st ege

wrong:

let storageRef=Storage.storege().reference().child("profile_image").child(fileName)
                         ~~~~~~~

positive:

let storageRef=Storage.storage().reference().child("profile_image").child(fileName)


2022-09-30 19:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.