Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirebaseStorageUI Cannot find type 'StorageReference' in scope (SPM) #1115

Closed
ivex001 opened this issue Nov 2, 2022 · 5 comments
Closed

Comments

@ivex001
Copy link

ivex001 commented Nov 2, 2022

Xcode 14.0.1
FirebaseUI 12.3.1
Swift

Hello guys,

After adding FirebaseStorageUI via Swift Package Manager i'm not able to get StorageReference . i get this error:
"Cannot find type 'StorageReference' in scope"
Before migrating from CocoaPods to SPM the code below worked fine

import FirebaseStorageUI

class MainMenuCell: UITableViewCell {
  let storage = Storage.storage()
  var storageRef: StorageReference?
}
@morganchen12
Copy link
Contributor

Are you able to import FirebaseStorage? You may be running into #1028 (comment).

@ivex001
Copy link
Author

ivex001 commented Nov 2, 2022

Are you able to import FirebaseStorage? You may be running into #1028 (comment).

Hi, yes i'm able to import FirebaseStorage but when i do it's like it overrides the FirebaseStorageUI and then i get this error when trying to get de reference for SDWebImage:

Cannot convert value of type 'StorageReference' to expected argument type 'URL?'

Could you please tell me where exactly should i add this line:
-Xcc -fmodule-map-file=$(GENERATED_MODULEMAP_DIR)/FirebaseStorage.modulemap

@ivex001
Copy link
Author

ivex001 commented Nov 2, 2022

Hi @morganchen12 don't bother i manage to find where.
it worked!! thank you for your assist mate

If someone else wants to know is in your Project Settings -> Build Settings -> search for Swift Compiler - Custom Flags -> Other Swift flags . I add it to degub and release config

@morganchen12
Copy link
Contributor

Glad it worked!

@zakariahmusic
Copy link

#1111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants