-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
FR: Support for Swift Package Manager #3136
Comments
This comment has been minimized.
This comment has been minimized.
Hey @w0mba7 - thanks for the report 😄 We're excited and looking into the best way we can support this as soon as we can, but there are a few dependencies and file structure changes we may need to do. We started experimenting with support on a branch at https://github.com/firebase/firebase-ios-sdk/tree/spm-master a few weeks ago and have a better idea of the approach we need. We also started a discussion on binary framework distribution on the Swift forums but it looks like we may get some more information from a WWDC session this week titled Binary Frameworks in Swift This won't be something we can do overnight but want to support it as soon as we can, there are a few bugs to work out as well (like SR-10707 that I discovered while working on adding support). |
#2135 linking issues. |
My experiment was to take the Carthage Binaries and add this to the Targets section but complains that the module map is in the wrong place:
moving things around in the folders and renaming did not seem to help.
|
This comment has been minimized.
This comment has been minimized.
Follow the progress at https://github.com/firebase/firebase-ios-sdk/commits/spm-master. Suggestions and PRs welcome! |
Much of Firebase Unit Testing relies on OCMock which does not yet support Swift PM. That could be a great place for someone in the community to contribute to accelerate the migration. |
For Firebase to support Swift Package Manager, there will need to be several changes to both Swift Package Manager and Firebase. See https://github.com/firebase/firebase-ios-sdk/commits/spm-master for the prototype implementation which successfully built a few of the Firebase libraries with SwiftPM. Below is a summary of some of the key requirements: Binary library support Resource support Separately versioned libraries per repo Firebase could consider abandoning separately versioning its libraries like it already does for binary and Carthage distributions. This would be especially unfortunate for managing new libraries with zero major versions of semantic versioning. Build Settings Module Map Generation Testing - OCMock Subspec support Private Headers |
Thanks for your work on this! |
The latest Xcode Beta 4 says under resolved issues "Swift packages that use unsafeFlags build settings can’t be used as a dependency. (50354068)" this could be a breakthrough in getting prebuilt binaries to work. It may allow "-F" to be passed as well as "no-objc-arc". Haven't tried it yet but thought I would let you know. |
@ivanvorobei thanks for testing! Which version of Xcode are you using? |
@ryanwilson I am use last beta of 11 Xcode. |
@ivanvorobei @julienbodet Thanks for the reports! Something has changed between Xcode 11 beta 2 and beta 5 that leads to this issue. I've asked a question about it on the SwiftPM forum. |
FYI, a forum discussion today about adding the |
Any update on this? |
We'll do a full reassessment with the latest Xcode 11 in the next week or two, but it doesn't seem there has been much progress on most of the open issues. |
@paulb777 (and anyone else working on this) Excellent work, exciting progress! |
Something changed yesterday and I can no longer update or install the package. It's worked of weeks and worked fine around 6:30 am, but I haven't been able to get it to work since sometime yesterday afternoon. Adding the package seems to work when the Firebase package is imported into another package, but adding Firebase directly or indirectly into a project fails with an error saying that the package can't be resolved. This consistently happens after the fetching of https://github.com/paulb777/nanopb.git. The error is quite long and includes some local path info but ends with |
Are there installation instructions? I'm new to Firebase and followed the console's setup instructions, simply swapping out the CocoaPods step with SPM (File > Add Swift Package > github URL > FirebaseAnalytics). Whatever I did was wrong because I couldn't get the SDK to actually contact the service. The only way I was able to get things working was by nixing SPM and manually downloading the frameworks, which is less than ideal. |
Please select the "master" branch when adding the repo as a Swift Package. |
@ttimpe That's what I did. Are things just supposed to work at that point? If I need Analytics and Crashlytics in my app, do I just need the |
@jchitel The |
@Greyder We'll likely need a reproducible example to help investigate. |
@paulb777 would it be better for me to create a separate issue to dig into this further? I'd rather not bloat this issue with my specific problems. |
@jchitel Yes. Please create separate issues to discuss specific Swift Package Manager problems/questions. |
Hi, when I added Firebase Analytics using SPM, the app size got increased by 20 MB, I don't think that this is normal. EDIT: I have opened an issue here with more details. |
Hey @FaroukZeino, as per Paul's comment previously it might be best to raise this as a new issue so it can be tracked and discussed on it's own. |
I try connect firebase use swift package manager.
I see error: What am I doing wrong? Mac OS: 10.15.6 |
@ramzesku The referenced Firebase UI branch is a prototype of a small part of the API. It is not ready for use. Please follow firebase/FirebaseUI-iOS#886 for FirebaseUI. |
Also Xcode 12 is required to use SPM with the |
I'm on Xcode 12 beta 5. I tried installing Firebase via SPM using the master branch and get the following error. I have Firebase, FirebaseAnalytics and FirebaseCrashlytics selected. Am I missing something in the setup process? (Also, is Firebase Performance Monitoring available via SPM?)
|
Is it possible to disable Firebase SPM when running a Catalyst app? ` While building for Mac Catalyst, no library for this platform was found in '/Users/dylanlualdi/Library/Developer/Xcode/DerivedData/AppName-gagejbizaaploadvmidwqbbcikwt/SourcePackages/artifacts/Firebase/FIRAnalyticsConnector.xcframework'. While building for Mac Catalyst, no library for this platform was found in '/Users/dylanlualdi/Library/Developer/Xcode/DerivedData/AppName-gagejbizaaploadvmidwqbbcikwt/SourcePackages/artifacts/Firebase/GoogleAppMeasurement.xcframework'. ` |
@khuffie I'm not sure what's happening. It looks like somehow your app is trying to link Firebase Performance is not yet available via SPM. @LualdiD With a quick investigation, I don't see an immediate way to disable Catalyst building for Firebase Analytics. There might be a way to temporarily adjust a Build Setting like the CocoaPods workaround, but that wouldn't be very stable. I'll follow up with the Analytics team to see if we can eliminate the sign up requirement so that we could include the Analytics Catalyst Early Access with SPM. All, I'll reiterate the request to open a new issue for specific issues/questions like these ones. Thanks! |
We're starting a Swift Package Manager beta for Firebase. To use it select the Firebase GitHub repository - Limitations include:
See more detailed instructions here. I'm going to lock this issue for only future status updates. Please create a new GitHub Issue(https://github.com/firebase/firebase-ios-sdk/issues/new?template=bug_report.md) for any questions, comments or issues about Firebase and Swift Package Manager (including for the limitations listed above). See current open Swift Package Manager issues here. |
With the Firebase 7.0.0 release, we now support standard Swift Package Manager versioning. The beta status continues while we get the last few Firebase products supported and the Xcode Swift Package Manager implementation stabilizes. Getting started instructions at https://github.com/firebase/firebase-ios-sdk/blob/master/SwiftPackageManager.md Please open an issue with any questions or bugs. |
With iOS support for Swift Package Manager in Xcode 11 can we please get that added to this project.
The text was updated successfully, but these errors were encountered: