With iOS support for Swift Package Manager in Xcode 11 can we please get that added to this project.
I found a few problems with this issue:
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).
https://github.com/firebase/firebase-ios-sdk/issues/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:
error: package has unsupported layout;modulemap '/Users/user/Projects/RideCore/Carthage/Build/iOS/nanopb.framework/Modules/module.modulemap' should be inside the 'include' directory
moving things around in the folders and renaming did not seem to help.
targets: [
.target(
name: "Core",
dependencies: ["stuff"],
path: "Carthage/Build/iOS",
linkerSettings: [
LinkerSetting.linkedFramework("FirebaseAnalytics"),
LinkerSetting.linkedFramework("FirebaseCore"),
LinkerSetting.linkedFramework("FirebaseDatabase"),
LinkerSetting.linkedFramework("FirebaseMessaging"),
LinkerSetting.linkedFramework("GoogleUtilities"),
LinkerSetting.linkedFramework("leveldb-library"),
LinkerSetting.linkedFramework("GoogleAppMeasurement"),
LinkerSetting.linkedFramework("GTMSessionFetcher"),
LinkerSetting.linkedFramework("nanopb"),
LinkerSetting.linkedFramework("Protobuf")
]
Related to #2135
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
Some of the Firebase libraries may not open source. Thus for Firebase to completely move to SwiftPM, binary library support must be added, including support for depending on a source-based Package from a binary package. See the Swift forum discussion. The pitch to support framework search paths could provide a workaround.
Resource support
Firebase ML, Firebase In App Messaging and Firebase Firestore require resource support. There may be a workaround for Firestore, but not for the others. See Swift bug.
Separately versioned libraries per repo
Firebase currently separately versions its libraries from a single mono-repo. This could be accomplished with SwiftPM by adding multiple package support to a repo or by adding the ability to version libraries within a package. Xcode would also need to be similarly updated.
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
Some Firebase libraries rely upon being able to build some of their sources with and without Automatic Reference Counting (ARC). There does not seem to be a way to do this. See Forum discussion and Swift build setting proposal.
Module Map Generation
Objective-C modules aren't generated for Objective-C targets. This causes us to rely on changing our import statements to use local header paths instead of framework paths. See https://bugs.swift.org/browse/SR-10707
Testing - OCMock
Most of Firebase unit testing relies upon OCMock which does not yet have Swift Package Manager support.
Subspec support
Firebase relies upon subspecs so that different library combinations can choose different subsets of the GoogleUtilities support library. Now that static libraries/frameworks are better supported, it is probably feasible to split each GoogleUtilities subspec into a separate library.
Private Headers
Firebase uses the CocoaPods/Xcode private headers feature to share non-public APIs across libraries. It might be feasible for Firebase to abandon the use of this feature in favor of repo-relative import paths.
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.
Trying install spm-master branch via SPM, get this error:

$(SRCROOT) in Package.swift
@ivanvorobei thanks for testing! Which version of Xcode are you using?
@ryanwilson I am use last beta of 11 Xcode.
Trying install
spm-masterbranch via SPM, get this error:
$(SRCROOT)inPackage.swift
I got the same error using Xcode Version 11.0 beta 5 (11M382q) when trying to add the package to my project. After a quick look at the documentation, it seems the path has to be relative to the project directory:
/// - Parameters:
/// - path: The path of the directory that contains the headers. The path is relative to the target's directory.
/// - condition: A condition that restricts the application of the build setting.
public static func headerSearchPath(_ path: String, _ condition: PackageDescription.BuildSettingCondition? = nil) -> PackageDescription.CSetting
@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 -fno-objc-arc option to library builds. Firebase needs this in libraries that depend on Protobuf.
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.
Any update on this?
There's essentially no change from the July 9th comment above. There have been some proposals and discussions about some of the necessary features in the Swift Package Manager Forums, but not much tangible progress yet.
Any chance to use firebase through SPM now?
still no update? its been so long
While it's great to see everyone so excited to adopt Swift Package Manager in their projects, there's currently nothing the Firebase team can do to support it. Once SPM supports binary frameworks I'm sure they'll give us an update, but until then all the comments asking for updates aren't particularly useful.
It's difficult if you don't use CocoaPods... I have a legacy Objective-C project that I'm trying to integrate Firebase into. It doesn't use CocoaPods because there were so many issues. I just spent an hour manually integrating Firebase and Crashlytics and get this error:
* Terminating app due to uncaught exception 'FIRAnalyticsVersionMismatch', reason: 'Google Analytics for Firebase version (60105000) does not match with Google App Measurement (60103000) version. Please update.'
I have the latest firebase manual download and the latest Crashlytics manual download. So with manual, it won't work; Swift Package Manager isn't happening; and there is no Carthage support. So basically, unless you use CocoaPods, you are out of luck. Discouraging.
@inPhilly It looks like you have a FirebaseAnalytics.framework and GoogleAppMeasurement.framework from two different distributions.
Firebase does have an experimental Carthage distribution. See https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md
Until SE-0272 is integrated, there's nothing Firebase can do here... I'm eagerly awaiting for SPM support as a consumer as well, but they literally can't do anything when SPM is missing a feature that Firebase depends on.
Be reasonable, people.
Why don't they use linked binary frameworks?
See https://forums.swift.org/t/binary-frameworks-with-swiftpm/26225/2
@tychop Missing support for binary dependencies is just one of several missing Swift Package Manager features necessary to support Firebase. See above.
Any one suugest to me ,I want the Firebase initialise without Google-Service.plist?
@amit6061 I'm not sure this is the great place to ask this kind of questions.
Please stop spamming this issue (every post will notify by email a lot of people), I'm pretty sure Firebase engineers will updated us once SPM will be more compliant with Firebase.
I have send the notification from Firebase Cloud Messaging Panel .
I am getting the error ,Please help me
objc[600]: Class FIRMessagingPersistentSyncMessage is implemented in both /private/var/containers/Bundle/Application/E28A6E76-BC27-4207-AD6C-03C7D95ADBA6/iZootoTesting.app/Frameworks/iZooto_release.framework/iZooto_release (0x1013a0920) and /var/containers/Bundle/Application/E28A6E76-BC27-4207-AD6C-03C7D95ADBA6/iZootoTesting.app/iZootoTesting (0x100968950). One of the two will be used. Which one is undefined.
@amit6061 Please make a separate issue. Your issues aren’t relevant to the actual SPM thread and I can imagine others aren’t too happy getting notifications over this... (ironically I’m sending emails to a ton of people too, which I apologize in advance for)
ok
On Wed, Dec 4, 2019 at 2:05 PM Umar Haroon notifications@github.com wrote:
@amit6061 https://github.com/amit6061 Please make a separate issue.
Your issues aren’t relevant to the actual SPM thread and I can imagine
others aren’t too happy getting notifications over this...—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-ios-sdk/issues/3136?email_source=notifications&email_token=ANSGFZX77RS6OZ65DRGMIBLQW5TULA5CNFSM4HS7ALKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF4FJYY#issuecomment-561534179,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANSGFZURJBTAK7M7X7I4ETTQW5TULANCNFSM4HS7ALKA
.
--
Thanks and Regards,
Amit Kumar Gupta
Android/iOS Developer
3rd Floor, A-35,
Sector 2- Noida 201301
Contact: 7905717240
www.izooto.com
I'm just now revisiting this and would really like to use Firebase Crashlytics, but I read on another thread that you will not ultimately be supporting Carthage because of Swift Package Manager; especially with there being so many problems with Swift Package Manager, and because Carthage is another choice that is not going away anytime soon, I fail to see why you would not want to pursue officially supporting Carthage. Because I cannot use CocoaPods, and can't keep up with manually integrating and updating Firebase, I for one am forced to look elsewhere, when I would really like to use Firebase in my apps.
@inPhilly If it helps, I would expect us to continue Carthage experimental support at least until Swift Package Manager is available.
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:
error: package has unsupported layout;modulemap '/Users/user/Projects/RideCore/Carthage/Build/iOS/nanopb.framework/Modules/module.modulemap' should be inside the 'include' directorymoving things around in the folders and renaming did not seem to help.
targets: [ .target( name: "Core", dependencies: ["stuff"], path: "Carthage/Build/iOS", linkerSettings: [ LinkerSetting.linkedFramework("FirebaseAnalytics"), LinkerSetting.linkedFramework("FirebaseCore"), LinkerSetting.linkedFramework("FirebaseDatabase"), LinkerSetting.linkedFramework("FirebaseMessaging"), LinkerSetting.linkedFramework("GoogleUtilities"), LinkerSetting.linkedFramework("leveldb-library"), LinkerSetting.linkedFramework("GoogleAppMeasurement"), LinkerSetting.linkedFramework("GTMSessionFetcher"), LinkerSetting.linkedFramework("nanopb"), LinkerSetting.linkedFramework("Protobuf") ]
@possen Did you ever figure out how to get it working? I'm also looking into a similar approach but ran into the exact same issue.
A quick update for anyone still watching this thread: proposal SE-0272 has been accepted by the Swift Evolution team. This proposal involves adding support for binary dependencies to the Swift Package Manager and, once implemented, will mean that the Firebase SDK can hopefully be distributed as a Swift package.

xcode 11.3
@mkalayci35 Firebase isn't available via Swift Package Manager yet, that's what we're discussing in this issue.
Same error here, no firebase sdk in package manager yet!
@floriangbh The sentiment is fine in the previous comment, but the language is not. I'm deleting. Please keep subsequent comments along the lines of https://github.com/firebase/firebase-ios-sdk/issues/3136#issuecomment-560365440.
Others, the appropriate way to indicate your desire for this feature is to thumbs-up the issue and/or work on contributions to Swift Package Manage and this repo to address the known issues discussed above.
Interesting. You want us to migrate from Fabric, but you can't support the main way to add dependencies now.
Looks like part/all of SE-0272 (Binary Dependencies in SPM) has been implemented, finalised with this PR: https://github.com/apple/swift-package-manager/pull/2514/
Also looks like good progress on resources APIs has been done - fingers crossed for another great update to SPM coming soon 👍 🤞
Unless Apple will release Xcode 11.5 before WWDC, I don't see this happening before Xcode 12 is released together with all new OS's. The required features mentioned upthread won't be part of Swift 5.2 and therefore of Xcode 11.4.
The Swift 5.3 Release Process was just posted, stating that the branch for SwiftPM will be cut tomorrow. We'll use that once it's cut to test and try to get support working before the next Xcode release (presumably WWDC timeline, but nothing was confirmed in this post for release timeline). Once we have something functional I'll update here and folks can test, hopefully we can get a lot of testers in before the release so we can get cherry-picks for any fixes needed.
I am putting Firebase, Crashlytics and app distribution on hold until this is resolved. Pods are a no go.
Overwriting Crashlytics/Fabric to Firebase. Same error here

@fabriciomasiero I believe you commented on the wrong issue - please re-open a new issue or comment on the original one you intended to as I've marked the comment as off-topic. No need to respond to this message.
@juanjoseluisgarcia we're eagerly awaiting the release of binary framework support for SwiftPM as well, but in the meantime we do offer Carthage and Zip distribution for those that don't want to integrate with CocoaPods.
Hi @ryanwilson — is Xcode 11.5 GM (11E608c), holding Swift version 5.2.4, the right thing? I'm afraid not, as you mentioned Swift 5.3, which seems to be hold for WWDC I'm afraid :(
Swift 5.3, which seems to be hold for WWDC I'm afraid
@stuffmc that's expected.
It seems that adding firebase with the Swift Package Manager is still not working.
I am using 11.5 Xcode (11E608c) on macOS catalina 10.15.5, with swift 5.2.4
I entered this url into the web address box.
https://github.com/firebase/firebase-ios-sdk
The default option is to use by Version up to Next Major 6.26.0
I get this error.
Package Resolution Failed
firebase-ios-sdk could not be resolved:
Fetching https://github.com/firebase/firebase-ios-sdk
https://github.com/firebase/firebase-ios-sdk has no Package.swift manifest for version 6.26.0
Activity Log Complete
1 Error.
@sk92129 you'll have to be a bit more patient. It will only work with Swift 5.3, whenever it's released. We all guess Xcode 12 at WWDC on June 22nd. Until now, Xcode 11.5 has Swift 5.2.4, which doesn't support binary frameworks yet.
@sk92129 you'll have to be a bit more patient. It will only work with Swift 5.3, whenever it's released. We all guess Xcode 12 at WWDC on June 22nd. Until now, Xcode 11.5 has Swift 5.2.4, which doesn't support binary frameworks yet.
@stuffmc I think the ones that should have been more patient is Google. Fabric worked like a charm. Now I moved on to TestFlight and I have no time to go back and forth testing things that are not finished. This should have not been released yet. Period. They lost me as a user for both Fabric and Firebase.
Can somebody please lock this thread to stop in the influx of unhelpful and unrelated comments? This issue is of importance to me, but only actionable information would be appreciated at this point.
Sorry about the noise, but since this is an open issue and both the Firebase SDK and Swift Package are open source projects, I'd prefer to keep the channel open for constructive conversation with the community.
If anybody is repeatedly abusive or off-topic, they will be reported and/or blocked.
As mentioned above, we expect to be able to move forward with Swift Package Manager support when Apple releases the binary framework support integrated in Xcode.
We've made some progress in the last week and currently have the FirebaseStorage quickstart running with FirebaseAuth, FirebaseStorage, and FirebaseStorageSwift integrated via the Swift Package Manager. To try it out, follow along or contribute, see #5706 and https://github.com/firebase/firebase-ios-sdk/tree/spm-master2020.
I think WWDC20 has changed the situation, right?
https://developer.apple.com/videos/play/wwdc2020/10147/
https://developer.apple.com/documentation/swift_packages
As per beta's changelog, Xcode 12 will bring support for resources, binary frameworks and more using SPM
Thanks for the comments folks - you're right: we got a lot of things we've been waiting for! We're working on getting this up and running and working out some issues like binary targets having dependencies on other targets. We'll update this thread as we make progress and when it's ready for further testing.
Thanks for your patience with us on this!
Hey everyone,
As promised, I have an update on progress. In order to make it easier to track, we created a GitHub Project with "To do", "In Progress", and "Done" columns that show the current status.
New challenges we've seen include supporting different platforms for different libraries (i.e. DynamicLinks only supports iOS, but others support macOS and tvOS as well), and a limitation where we have to run all unit tests for the package on CI instead of just running a subset (useful for only running Auth tests when Auth changes, etc. Forum post). We'll be filing some Feedback, using work-arounds if we can, and will look at making contributions where possible as well to support these use-cases.
For those that are eager to try it out, the following SDKs are available already when using Xcode 12: Auth, Core, Crashlytics, Functions, Installations, and Storage (with StorageSwift). I don't recommend mixing CocoaPods and SwiftPM but if you need only that subset of products, please give it a go and let us know (in a separate issue) if you run into problems for those specific libraries. You'll have to use the master branch at the moment but should be able to use the CocoaPods-6.28.0 tag in the next couple of days.
Thanks, and once again we appreciate the patience as we work through this!
Sounds cool! Would it be possible for you to start implementing Firestore first? I think many (at least me) use the Auth-Firestore-Storage combo in many projects and are waiting for this product to start testing. Thanks so much!
@ryanwilson Can the platform differences be resolved using the #if canImport(ModuleName) directive? Seems like what packages like SwiftLint is doing. I'm not sure if it's the same issues though.
@lorenzofiamingo We'll see what we can do, but Firestore will likely be one of the last libraries to support Swift Package Manager because of its complicated dependency structure.
@dvanwinkle @ryanwilson is more on top of this than me - but I believe #if canImport(ModuleName) or other #if options would work in the sources, but we'd ideally like to specify different platforms for certain .librarys in the Package.swift.
In other news, we're making progress on enabling unit testing in https://github.com/erikdoe/ocmock/pull/442
I look forward you migrate the pods Firebase/Crashlytics and Firebase/Analytics to SwiftPM 🙂
@dvanwinkle thanks for the suggestion! That can definitely be helpful and we'll need to end up using it, but wasn't what we had originally hoped was possible. To keep it short, the ideal situation would be a library that is only visible to a subset of platforms specific in the Package.swift manifest (currently the Package itself defines platform support). That's not possible, so we'll need to now include all the sources for every platform and make sure SDKs that only support some platforms (such as DynamicLinks not being able to support tvOS since there's no browser on tvOS) can compile on that platform, or exclude the source entirely.
The new plan is to mark all those APIs with @available only marking the correct platform availability and ensuring that it can compile otherwise. An alternative would be to wrap each file in a #if TARGET_OS_<PLATFORM> check, but that's a big more involved and leaves to sources to be compiled at all which could cause some confusion. We'll see how this plan goes 😄.
@lorenzofiamingo thanks for that link as well, we may have been able to make something work with that but it still has the problem of the original target being available only for certain platforms, which as far as I can tell would mean it needs to be in a different Package manifest.
@TofPlay Crashlytics is ready but keep an eye out on the tracker for Analytics - there are likely a few other things to try to get done before Analytics but we're working through the list.
I've seen a couple of URLs to try out SPM. @ryanwilson, do you have a recommended target to use with SPM for now?
@stevekellogg We don't yet recommend using SPM with Firebase for production development.
However, if you'd like to try out early versions, we'd love to get your feedback.
The spm-master2020 branch is stable with support for Storage and Auth.
The master branch is more complete. See the products in https://github.com/firebase/firebase-ios-sdk/blob/master/Package.swift for details. The Package.swift in the master branch requires Xcode 12. We're actively working there and there may be stability fluctuations.
Please open separate issues with any feedback.
Perfect, thanks @paulb777. Yes, understood that this is not for production. I'm just looking to try it out on a new project that won't hit production till January at the earliest.
Am I right in thinking that RemoteConfig isn't yet supported by the SPM package? It is mentioned in the Package.swift, however just importing Firebase doesn't expose it.
Hi,
I have attempted to add the sdk through SPM. I am using XCode 12 beta, branch master. But when I attempt to add the package it says "has no Package.swift manigest for version 6.26.0...


Hi,
I have attempted to add the sdk through SPM. I am using XCode 12 beta, branch master. But when I attempt to add the package it says "has no Package.swift manigest for version 6.26.0...
Instead of selecting a specific version, please just choose the master branch by just selecting the second radio button in the first screenshot you posted.
Thank you.
@ttimpe Good catch! Thanks for pointing out the oversight in the Package.swift. Fixed in #6105
@mdanazhiev As @ttimpe pointed out, the master branch should be specified.
We're intentionally not supporting version installation yet to make it clear that Firebase SPM support is still a work in progress, only intended for evaluation and feedback, and not recommended for inclusion in production apps.
I was just testing, my bad not checking with selecting branch not version.
Is there any timeframe for the other missing packages to be included in the SPM release like Analytics? Ideally, SPM support should be stable by September with the upcoming release of iOS 14. A lot of other developers are, like myself, also getting rid of CocoaPods wherever they can as it can mess up lots of stuff.
I fetched repository.
Well, it would be nice to have an installation instruction. You have a lot of libraries and I don't know which library I should link to my app target if I want, for example, use only Crashlytics.
Also, you have to put a lot of #if / #canImport statements to target iOS 13 and Combine. Promises and GTMFetcherSession are unnecessary. Please, don't add these dependencies.
@lolgear Firebase SPM support is still a work in progress, so documentation is not a priority now.
Anyway, when you add the package, XCode gives you the possibility to choose the package products of the repo. You should simply select the one you want.
If they've added Promises and GTMFetcherSession probably they are using them in the package product you've selected.
Ok, so this is more of an SPM question than a Firebase question, but wondering if someone here knows. I'm using the new SwiftUI "multiplatform" template, and I'm trying to use SPM to include Firebase (for testing and evaluation). When I try to attach the Firebase package, XCode doesn't seem to allow me to attach it to BOTH the iOS and macOS projects, but it seems that I can attach it to either. Does anyone here know how I could attach it to both?
@stevekellogg try this: Consume Swift Package for multiple targets
Hi guys, does this issue mean we only can use Xcode 12 beta currently? (Xcode 11.6, using master Branch)
Personally, the sdk team could pay more attention on SPM part rather than CocoaPods because SPM will become more mainstream in the future. Especially, SPM is quite easy for developers, and it is a official feature powered by Apple.

@lwfnz Yes - Xcode 12 is required. SPM introduces some necessary features like binary and resource support with Xcode 12.
We completely agree that SPM is growing in importance, but it's still early days. SPM is just now adding the features necessary to support large, long-standing code bases. See this Twitter discussion for more on current SPM limitations.
@paulb777 Thanks for your quick reply.
It is certainly that the Cocoapods supports is important as well in the next year. Nonetheless, from new firebase users perspective, it would be significant to provide a fast lane to easier adopt firebase in their projects. Because this is not about tech but about market share competition among Google, AWS and MS.
Best wishes for your team.
@lwfnz Thanks! It's a priority for us to get the SwiftPM fast lane in place. In the meantime, we'll continue to make sure the CocoaPods experience is as smooth as possible.
I noticed FirebaseFirestoreSwift and FirebaseUI-iOS aren't in the todo project (https://github.com/firebase/firebase-ios-sdk/projects/1) can/should they be added please?
@nikitaame FirebaseFirestoreSwift is in progress in #6072 and I've successfully built and run the Firestore quickstart with it. FirebaseUI is out of scope of the SDK project. I recommend opening a feature request at https://github.com/firebase/FirebaseUI-iOS. However, I did do a hacky minimal implementation in https://github.com/firebase/FirebaseUI-iOS/tree/pb-spm sufficient for the Firestore quickstart.

@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 rev-parse --verify '82230e9998a35a3d2144884204db64f045c880c4^{commit}' output: fatal: Needed a single revision
@ishabazz It seems that SwiftPM only clones a limited set of repo branches. Our CI caught the issue and we should merge #6187 to master later today to resolve. In the meantime the branch pb-fix-git is a workaround.
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.
Are there installation instructions?
Please select the "master" branch when adding the repo as a Swift Package.

Hi guys, I'm having a problem with FirebaseFirestore using the SPM, I'm sure I included it in the Targets -> Framework, Libraries
@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 FirebaseAnalytics and FirebaseCrashlytics packages? Or do I also need Firebase or FirebaseCore? The instructions in the console say that I should be able to import the module Firebase in my code, but that module isn't available for me via SPM. I need to use FirebaseCore instead.
@jchitel The Firebase module is available via SPM.

@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.
1) Enter: https://github.com/firebase/FirebaseUI-iOS
2) Enter branch: pb-spm

3) Click next button.
I see error:
Showing All Messages
: package at 'https://github.com/firebase/FirebaseUI-iOS' @ 25f6725045da8f0057748af48cfa5c55651feebb is using Swift tools version 5.3.0 but the installed version is 5.2.0
What am I doing wrong?
Mac OS: 10.15.6
Xcode: 11.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 https://github.com/firebase/FirebaseUI-iOS/issues/886 for FirebaseUI.
Also Xcode 12 is required to use SPM with the master branch of https://github.com/firebase/firebase-ios-sdk.git. At least beta 4 is required for FirebaseAnalytics. At least beta 5 is required for SwiftUI preview support.
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?)
This app could not be installed at this time.
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Could not install at this time.
Recovery Suggestion: Failed to load Info.plist from bundle at path /Users/khuffie/Library/Developer/CoreSimulator/Devices/51AC233A-4600-47F4-919D-E5640337061E/data/Library/Caches/com.apple.mobile.installd.staging/temp.NwfOQl/extracted/Widget Wizard.app/Frameworks/GoogleAppMeasurement.framework; Extra info about Info.plist: Couldn't stat /Users/khuffie/Library/Developer/CoreSimulator/Devices/51AC233A-4600-47F4-919D-E5640337061E/data/Library/Caches/com.apple.mobile.installd.staging/temp.NwfOQl/extracted/Widget Wizard.app/Frameworks/GoogleAppMeasurement.framework/Info.plist: No such file or directory
--
Failed to load Info.plist from bundle at path /Users/khuffie/Library/Developer/CoreSimulator/Devices/51AC233A-4600-47F4-919D-E5640337061E/data/Library/Caches/com.apple.mobile.installd.staging/temp.NwfOQl/extracted/Widget Wizard.app/Frameworks/GoogleAppMeasurement.framework; Extra info about Info.plist: Couldn't stat /Users/khuffie/Library/Developer/CoreSimulator/Devices/51AC233A-4600-47F4-919D-E5640337061E/data/Library/Caches/com.apple.mobile.installd.staging/temp.NwfOQl/extracted/Widget Wizard.app/Frameworks/GoogleAppMeasurement.framework/Info.plist: No such file or directory
Domain: MIInstallerErrorDomain
Code: 35
User Info: {
FunctionName = "-[MIBundle _validateWithError:]";
LegacyErrorString = PackageInspectionFailed;
SourceFileLine = 131;
}
--
System Information
macOS Version 11.0 (Build 20A5343i)
Xcode 12.0 (17210.1)
Is it possible to disable Firebase SPM when running a Catalyst app?
From the target, I set the platform for Firebase and FirebaseAnalytics to only iOS I get these 3 errors:
`
Showing All Messages
While building for Mac Catalyst, no library for this platform was found in '/Users/dylanlualdi/Library/Developer/Xcode/DerivedData/AppName-gagejbizaaploadvmidwqbbcikwt/SourcePackages/artifacts/Firebase/FirebaseAnalytics.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/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 GoogleAppMeasurement.framework dynamically instead of statically. Are you able to reproduce with https://github.com/firebase/quickstart-ios/tree/master/analytics?
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 - https://github.com/firebase/firebase-ios-sdk.git and 6.31-spm-beta.
Limitations include:
-ObjC linker option.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.
Most helpful comment
Thanks for the comments folks - you're right: we got a lot of things we've been waiting for! We're working on getting this up and running and working out some issues like binary targets having dependencies on other targets. We'll update this thread as we make progress and when it's ready for further testing.
Thanks for your patience with us on this!