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

FR: Firebase Performance Monitoring - Support for Swift Package Manager #6528

Closed
noahtrilling opened this issue Sep 22, 2020 · 46 comments
Closed

Comments

@noahtrilling
Copy link

Feature proposal

  • Firebase Component: Firebase Performance Monitoring

Firebase Performance Monitoring has not yet been added to Swift Package Manager. It would be nice to have this feature.

@paulb777 #6362 (comment) recommended creating a separate issue to track interest in Swift Package Manager support for Firebase Performance Monitoring. Thumbs up this issue to indicate that this is a high priority feature.

@joaoduartemariucio
Copy link

Do you have a deadline to add support for Firebase Messaging as well? @paulb777

@paulb777
Copy link
Member

paulb777 commented Sep 25, 2020

@noah-trilling Thanks for opening the issue. At this point, we're still working through the planning for FirebasePerformance. We'll update here when we have more to report. In the meantime, the thumbs help us to prioritize :)

@joaoduartemariucio Firebase Messaging SPM has landed in the Firebase 7.x breaking change branch in #6541 which should get out in the next few months.

@joaoduartemariucio
Copy link

@paulb777 Perfect, thanks for the feedback.

@rromanchuk
Copy link

is it possible to sideline pod 'Firebase/Performance', or is the podspec going to cause issues dependency conflicts with spm. I guess i can just give it a try

@paulb777
Copy link
Member

The pod dependencies are likely to cause problems. A better workaround would be to get its binary from the zip distribution or Carthage distribution.

@rromanchuk
Copy link

@paulb777 duh, sorry. Thanks for working on this

@joaoduartemariucio
Copy link

@paulb777 Could you please notify this issue when the version of Firebase Message with SPM support is released. I am looking forward to implementing it in my project. Or if there is a place that I can follow?

@paulb777
Copy link
Member

@joaoduartemariucio The FirebaseMessaging SPM support will be coordinated with the release of this milestone - https://github.com/firebase/firebase-ios-sdk/milestone/37

@clayellis-cricut
Copy link

@paulb777 I see that adding SPM support for Performance is slated for Firebase 7. We are migrating to SPM in our project and, unfortunately, will need to drop our dependency on Performance. For planning purposes, is there an estimated timeline for the Firebase 7 release?

@paulb777
Copy link
Member

paulb777 commented Oct 8, 2020

@clayellis-cricut Sorry, we don't communicate dates for anything not in this GitHub repo and even there we only share expectations based on our typical release patterns. While, Firebase Messaging is slated for Firebase 7, Firebase Performance is not. We'll add a milestone to this issue when it's expected.

@clayellis-cricut
Copy link

Thanks for the timely response. Makes sense.

@stephanboner
Copy link

Anything new regarding this issue?

@ryanwilson
Copy link
Member

For those that haven't seen, Messaging was added to the 7.0 release already.

Firebase Performance was just open sourced last night and is a major unblocker for SwiftPM support, but one blocker remains. Once FirebasePerformance removes its dependency on Protobuf, we'll be able to add support. No current ETA at the moment but stay tuned. Thanks!

@shanecowherd
Copy link

Any progress on this front? This is the last thing holding me back from dropping Cocoapods. Thanks!

@BrentMifsud
Copy link

Any updates on this?

@ghost
Copy link

ghost commented Feb 11, 2021

Any updates on this?

From what I can see in the board I believe the task is yet to be done.

Meanwhile, did anyone managed to setup Firebase Performance (from the zip distribution) side by side with Firebase Analytics (from SPM)?

@abagmut
Copy link

abagmut commented Feb 11, 2021

@lsvra I ended up moving all firebase stuff to Carthage for now (don't want to hassle with cocoapods anymore) :|

@timstudt
Copy link

Any updates on this?

From what I can see in the board I believe the task is yet to be done.

Meanwhile, did anyone managed to setup Firebase Performance (from the zip distribution) side by side with Firebase Analytics (from SPM)?

I believe you need to create a new manifest for the frameworks in the zip and solving those dependencies. I just needed Performance so I created a local package with Performance.xcframework and it's dependencies.

@shanecowherd
Copy link

@timstudt

would you mind describing exactly what you did....a friend of mine is asking ;)

@timstudt
Copy link

timstudt commented Feb 11, 2021

@timstudt

would you mind describing exactly what you did....a friend of mine is asking ;)

sure, I used it for iOS14 only project, in a local swift package called Analytics.
in Firebase top folder:

// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "Firebase",
    products: [
        .library(
            name: "FirebaseAnalytics",
            targets: [
            "FirebaseAnalyticsUmbrella",
            ]),
        .library(
            name: "FirebasePerformance",
            targets: [
                "FirebasePerformanceUmbrella",
            ]),
    ],
    dependencies: [
    ],
    targets: [
        .target(
            name: "FirebaseAnalyticsUmbrella",
            dependencies: [
                .target(name: "FirebaseAnalytics", condition: .when(platforms: [.iOS])),
                "FirebaseCore",
                "FirebaseCoreDiagnostics",
                "FirebaseInstallations",
                .target(name: "GoogleAppMeasurement", condition: .when(platforms: [.iOS])),
                "GoogleDataTransport",
                "GoogleUtilities",
                "nanopb",
                "PromisesObjC",
            ],
            path: "./FirebaseAnalytics/Sources"
        ),
        .target(
            name: "FirebasePerformanceUmbrella",
            dependencies: [
              "FirebaseABTesting",
              .target(name: "FirebasePerformance", condition: .when(platforms: [.iOS])),
              "FirebaseRemoteConfig",
              .target(name: "Protobuf", condition: .when(platforms: [.iOS])),
            ],
            path: "./FirebasePerformance/Sources"
        ),
        // FirebaseAnalytics
        .binaryTarget(name: "FirebaseAnalytics", path: "./FirebaseAnalytics/FirebaseAnalytics.xcframework"),
        .binaryTarget(name: "FirebaseCore", path: "./FirebaseAnalytics/FirebaseCore.xcframework"),
        .binaryTarget(name: "FirebaseCoreDiagnostics", path: "./FirebaseAnalytics/FirebaseCoreDiagnostics.xcframework"),
        .binaryTarget(name: "FirebaseInstallations", path: "./FirebaseAnalytics/FirebaseInstallations.xcframework"),
        .binaryTarget(name: "GoogleAppMeasurement", path: "./FirebaseAnalytics/GoogleAppMeasurement.xcframework"),
        .binaryTarget(name: "GoogleDataTransport", path: "./FirebaseAnalytics/GoogleDataTransport.xcframework"),
        .binaryTarget(name: "GoogleUtilities", path: "./FirebaseAnalytics/GoogleUtilities.xcframework"),
        .binaryTarget(name: "nanopb", path: "./FirebaseAnalytics/nanopb.xcframework"),
        .binaryTarget(name: "PromisesObjC", path: "./FirebaseAnalytics/PromisesObjC.xcframework"),
        // FirebasePerformance
        .binaryTarget(name: "FirebaseABTesting", path: "./FirebasePerformance/FirebaseABTesting.xcframework"),
        .binaryTarget(name: "FirebasePerformance", path: "./FirebasePerformance/FirebasePerformance.xcframework"),
        .binaryTarget(name: "FirebaseRemoteConfig", path: "./FirebasePerformance/FirebaseRemoteConfig.xcframework"),
        .binaryTarget(name: "Protobuf", path: "./FirebasePerformance/Protobuf.xcframework"),
    ] // targets
)

in my own package:

// swift-tools-version:5.3

import PackageDescription

let package = Package(
    name: "Analytics",
    platforms: [
        .iOS(.v14),
    ],
    products: [
        .library(
            name: "Analytics",
            type: .static, // redundant, cause it's static by default in my project
            targets: ["Analytics"]
        ),
    ],
    dependencies: [
        .package(name: "Firebase", path: "<path-to-firebase>"),
    ],
    targets: [
        .target(
            name: "Analytics",
            dependencies: [
                .product(name: "FirebasePerformance", package: "Firebase"),
                .product(name: "FirebaseAnalytics", package: "Firebase"),
            ],
            path: "Sources"
        )
    ]
)

it seems to work, but not sure if this is the best way to add it.

@shanecowherd
Copy link

@timstudt You are a legend good sir! Thank you so much.

@timstudt
Copy link

@shanecowherd please share if it works for you or what solution you come up with

@dimawushu
Copy link

Any updates?

@schlingding
Copy link

An update would be great as this has been preventing a full migration away from Firebase Carthage. Does #7680 relate?

@visumickey
Copy link
Contributor

visumickey commented Apr 7, 2021

Thanks a lot for highlighting the importance of the SPM support. We have been putting our energy to get this effort started up soon. We are currently targeting some critical changes for the upcoming I/O and after that we would have this prioritized and landed soon. We will use this thread updated as we set an ETA for this effort.

@harrygt
Copy link

harrygt commented May 13, 2021

With the latest release of 8.0.0 and SPM being out of beta I was wondering if there is an update or ETA for this?

@BrentMifsud
Copy link

BrentMifsud commented May 14, 2021

FirebaseAuth, specifically google sign-in also doesnt support SPM yet (you need to download the google sign in pod). Is there somewhere I can request SPM support for google sign in?

It seems as though that product hasn't been updated since 2019. Is it abandoned?

@paulb777
Copy link
Member

FirebaseAuth does support SPM, but GoogleSignIn does not yet. See #6477

@paulb777
Copy link
Member

@harrygt See the comment from @visumickey above about the FirebasePerformance plans.

@MalcolmnDEV
Copy link

Any new updates on adding Performance to SPM ?

@Nonnus
Copy link

Nonnus commented Jun 8, 2021

Can we please get a serious update on this topic?
There are plenty of professionals that have no other option other than to integrate firebase due to corporate demands that have to deal with a mixed SPM + setup with all the hassle and overhead it incurs!

How can you state you officially support SPM when you are missing such an important component of the toolset?
Sorry if I sound rude but it really is disappointing to see for how long this has been requested, judging from the age of this thread alone, without any progress...

Not to mention the blackhole that is the situation with GTM and Google Sign In, its a really sad time regarding iOS development and Google SDKs

@visumickey
Copy link
Contributor

Hello everyone, we are currently working on this effort and we are expecting to have this effort land very soon. We definitely understand the pain and the need of such a feature. We are putting our every effort possible to provide the feature at the earliest.

We are hoping to have this feature rolled out in next few weeks.

@shanecowherd
Copy link

ETA? Thanks

@maxdelia
Copy link

Any news? Thanks!

@bart-kace
Copy link

It's been over a month, any update @visumickey?

@visumickey
Copy link
Contributor

We are super glad to say that we have been working on this for the last 2 weeks and we are nearing completion for this effort. This is our highest priority and we are committed to land this change in the next few weeks (hopefully in the order of 1 or 2). We will keep this thread posted on the launch date once the changes are complete.

Honestly, this effort is much trickier than we thought since we have used Protobuf extensively and moving to NanoPb is nothing short of a medium size refactor.

@n-vart
Copy link

n-vart commented Jul 23, 2021

++

@BrentMifsud
Copy link

Looks like its finally been merged. Any idea when the next release will be coming?

@paulb777 paulb777 added this to the 8.6.0 - M102 milestone Aug 11, 2021
@paulb777
Copy link
Member

We're targeting to release it next week (the week of August 16th) with Firebase 8.6.0

@paulb777
Copy link
Member

Closing, since the fix is merged and staged for the next release.

@geeklingo
Copy link

Has anyone been able to get this to work? I'm not seeing anything in the logs for Performance with the 8.6.0 update.

@ncooke3
Copy link
Member

ncooke3 commented Aug 18, 2021

Hi @geeklingo, Firebase 8.6.0 was published today and the new version should be available now for SPM users. The update includes SPM support for Performance. The release notes are in the process of being published so please check back later to see release logs for 8.6.0. Apologies for any confusion! Let us know if you have any additional questions or run into any issues

@geeklingo
Copy link

Hi yes, thanks and can confirm it's working. You just have to remember to add the module, that was my mistake.

@bdrelling
Copy link

@ncooke3 as a heads up, Firebase Performance Monitoring was not included in the Firebase 8.6.0 release notes.

@ncooke3
Copy link
Member

ncooke3 commented Aug 18, 2021

Thanks @bdrelling, Performance's 8.6.0 release notes are live now.

@bdrelling
Copy link

Thanks @ncooke3, and thanks for everyone's hard work on getting this over the finish line!

@firebase firebase locked and limited conversation to collaborators Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.