-
Notifications
You must be signed in to change notification settings - Fork 479
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
FirebaseStorage-Swift.h missing in SPM build #1028
Comments
Apologies for the breakage, this is fixed in #1029. |
To clarify, the |
@morganchen12 Not sure if it's related, but the fix still has an error with importing:
|
Normally that error is associated with another error (the build failure when trying to build the module), can you find that error message? |
It looks like it might be the error, unable to build @import
FirebaseStorage in the change that was made.
Basically, with the fix above, using SPM, it's unable to import the module
(in Swift or Briding Header).
…On Wed, Jun 8, 2022 at 1:04 PM Morgan Chen ***@***.***> wrote:
Normally that error is associated with another error (the build failure
when trying to build the module), can you find that error message?
—
Reply to this email directly, view it on GitHub
<#1028 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABR253EETGNXGFIXQMKLOTVOD4FHANCNFSM5YCCOWFQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@cerupcat can you share the full build log? |
I am also seeing the same issue that @cerupcat and @kjsakata both described. I have a test project that is just a plain Swift app with a ContentView.swift file. I cloned FirebaseUI locally and added it as a local package to my Swift test project and got no errors but as soon as I attempt to use it by adding
More info:
Any help would be greatly appreciated. Thanks in advance! |
In case anyone else is struggling with this same issue, I was able to get around this issue by adding FirebaseUI-iOS by searching for and adding the hosted GitHub repo (rather locally cloning the repo and pointing it to my local copy). I saw this issue #1017 and saw the comment @kfujino7 left about the Package Dependency Rule needing to be set to 12.1.1 < 13.0.0. I was originally searching for "FirebaseUI" in the File > Add Packages > search box which wasn't pulling up FirebaseUI-iOS which in turn lead me to try and install the package by cloning it locally and adding my local copy of FirebaseUI-iOS (Add Packages > Add Local). But once I searched for the full GitHub URL (https://github.com/firebase/FirebaseUI-iOS) in the Xcode Swift Packages window, I was able to set the Package Dependency rule to TLDR: Attempting to clone and add FirebaseUI-iOS as a local package doesn't work. You need to search the full GitHub url in the Xcode Swift Packages window to find FirebaseUI-iOS, then update the dependency rule to a version higher than 12.1.1 which supports SPM. Hope this helps someone! |
Nevermind... The same three errors came back. 😢 I started a brand new SwiftUI project, added the hosted https://github.com/firebase/firebase-ios-sdk repo via the Xcode Swift Packages window with the dependency rule set to different variations of "up to next minor version" = 12.0.0, 12.1.1, and 12.2.0 as well as branch = "master". Initially it built and ran the project fine with just FirebaseUI-iOS (using just FirebaseStorageUI) added as the only package. But as soon as I tried to also add the main Firebase package (https://github.com/firebase/firebase-ios-sdk) (tried master & v9.2.0) so that I could use some of the more specific products like FirebaseFirestoreSwift, I was faced with the same 3 errors on build.
It was odd that I was able to run the project once without errors when only FirebaseUI was added. But now even if I remove the other main Firebase package that I thought was making the errors come back, I'm still seeing the errors when I remove the main Firebase package and only have the FirebaseUI one installed. Hope this gives more clues to what's going on. |
Also facing this issue. Any updates? |
Same I've had this issue for a couple of days and nothing has helped. I switched too sudo @react-native-firebase/[email protected] everything worked perfectly. |
I was not able to get the latest FirebaseUI-iOS versions (v12.0.0+ or the master branch) to build with any version of firebase-ios-sdk that was greater than v8.15.0 From what I suspect, the version 9.0.0 of firebase-ios-sdk changed the directory structure from what it was in version 8 and something in FirebaseUI-iOS's StorageUI is not finding the proper module declaration or header files when using the v9+ Firebase framework. By using v12.2.0 of FirebaseUI-iOS and v8.15.0 of firebase-ios-sdk, I was eventually able to get Swift Package Manager to build successfully and resolve all the build errors. But this means that I have to use the beta versions of things like FirebaseFirestoreSwift since those didn't come out of Beta until v9.0.0. It's not ideal but maybe this will help someone else who needs a stop gap solution until FirebaseUI-iOS's StorageUI can work with v9+ of firebase-ios-sdk. (Also FYI, I'm building a native SwiftUI project in Xcode using Swift Package Manager (SPM) like the original poster and not React Native or CocoaPods) |
Passing by in case anyone found a fix yet for react-native-firebase > 15? :/ EDIT: found some additional info here: Seems like there are some breaking change for Cocoapods users like us: Deprecated: Breaking change: Podfiles must include use_frameworks! or use_frameworks! :linkage => :static. Breaking change: C++/Objective-C++ clients should use #import <FirebaseFunctions/FirebaseFunctions-Swift.h> and #import <FirebaseStorage/FirebaseStorage-Swift.h> to access Functions and Storage APIs, respectively. Of course using use_frameworks! breaks other stuff on my end, but thought that might help someone else... |
@pierroo Where do I put this:
|
@morganchen12 Looks like a lot of us are still getting the issue using SPM. This means that we cannot use the latest version of firebase-ios-sdk. +1 issue reported by @cerupcat |
I wrote a helper function to achieve the same caching functionality with firebase storage while the FirebaseUI-iOS library is not compatible with firebase-ios-sdk v9.0.0+.
|
Did you find any solution? @dpyeates |
I'm facing the same issue using Xcode 14.0.1. I have to use Firebase 8.15.0 to be able to build with the latest version of the FirebaseUI package 🤔 Note : using SPM |
Hey all, if you're running into this issue with the latest version, can you try adding
to your target's |
That works! Will it be added to the documentation for how to use the package? |
I think this is something that Swift Package Manager is supposed to be adding to your target automatically. It's filed as a bug in swiftlang/swift-package-manager#4531 and described in this forum thread by the same author. I'll add a comment to the line where Xcode raises the build error and keep this issue open for the time being. |
Note that if you're in a pure SPM target, there's no way to access |
hey guys it solve this issue by follow this instruction from https://rnfirebase.io/ and then go to section: Altering Cocoa pods to use frameworks
that work for me |
Hey guys! Any news/updates? Thanks. |
@alexanderkhitev we're still blocked on the unresolved SPM bug. Have you had any issues with the workaround? |
Hey @morganchen12 ! No, I don't. |
Environment
Xcode version: 13.3.1
SPM
Firebase Component: FirebaseStorage (firebase-ios-sdk v9.1.0), FirebaseUI-iOS v12.2.0
Language: Swift
Problem
There is a reference to FirebaseStorage-Swift.h added in Update FirebaseUI for v8.x and v9.x compatibility #1024, but this header file cannot be generated automatically by the SPM build, even though it can be built successfully in Pods.
In order for SPM to build successfully without the cumbersome manual generation and addition of header files, it is necessary to statically place a ver 9-compliant header file in the FirebaseStorage library, as is the case with ver 8 support.
Is there a validity and plan to add a FirebaseStorage-Swift.h(ver 9-compliant header file) to the FirebaseStorage library for firebase-ios-sdk v9?
The text was updated successfully, but these errors were encountered: