-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Unable to install FirebaseAnalytics Xcode 12 with SPM #6360
Comments
I found a few problems with this issue:
|
Hey @coulonb - sorry for the issues you're seeing. I'm unable to reproduce this on both device and simulator. Can you please try creating a brand new project, following the installation steps and seeing if you still run into the issue? Also, is this an iOS/iPadOS app, or does it target a different platform? It could be a provisioning issue as well. We'll likely need a repro to make any further progress on it. Thanks! |
Thanks for the extra info @EthanHannah. @coulonb can you follow the same steps to see if that helps for you? Restarting, cleaning the build folder, and reinstalling the app? If that doesn't help you, we'll likely need a project or steps to reproduce the issue in order to make further progress. Hopefully that helps get you unblocked, though! |
I also have the same issue, I have Firebase Analytics as a dependency of another package that is added to my main project. I get the following error when I try to run the app on device or simulator and ive tried all the Xcode tricks with derived data, restarting devices etc.
|
@Neilfau sorry for the troubles. Are you able to reproduce it by creating a blank project and adding the dependency there? If it does, please let us know what steps you took so we can reproduce it. Without being able to reproduce it on our end we likely won't be able to help much more. Thanks! |
@ryanwilson with a blank project the app runs but crashes shortly after starting. All I call is |
@ryanwilson to clarify though that was a blank project with a local swift package dragged into the project with firebase as a dependency of that. Im now going to just add firebase as a dependency of the blank project and check that works. |
Thanks @Neilfau - the crashing issue sounds like you need to add the |
@ryanwilson ah yeah good point forgot to add that for the blank project. Will try again. |
@ryanwilson ok can confirm it works if Firebase is a dependency of a local package and if added to a blank project locally by dragging the package into Xcode and also if the firebase package is added to project directly. I have also added the package with the firebase dependency remotely and it also works fine, so I think the error is possibly related to having a project with 2 different packages that both have firebase as a dependency? |
Ah, so you're saying your setup has dependency Can you reproduce the above error with that setup? |
@ryanwilson not sure if I explained that well enough but my app structure is as follows: Package A - dependencies: Firebase Package (FirebaseCore, FirebaseDatabase) & Package B Xcode Project - dependencies: Package A |
@Neilfau makes sense, thanks. If you add those dependencies in the blank project (if possible), does the error happen for you still? |
@ryanwilson ive added firebase package (FirebaseCore, FirebaseDatabase) to the blank project and have also added the test package which has firebase (FirebaseAnayltics, FirebaseCore) as dependency also and the project builds and runs fine. The next thing im going to try is making a second package with a firebase dependency and adding both packages to the blank project and see what happens. |
@ryanwilson @EthanHannah Restarting, clean everything seems to be not the solution for me. I will tried with a new starter project and back to you. |
@ryanwilson Ok I completely recreated the same structure with a blank project and it works on both device and simulator so I'm no closer to finding the cause of the issue unfortunately. In my actual project I get this additional error when trying to run on a simulator compared to running on my device:
|
Like @Neilfau, after created new project with exactly the same structures (same lib, versioning flag,..) I don't have the problem on the new project. I don't understand where the problem on the initial project may come from. |
@ryanwilson think I've tried everything now & I still cannot recreate the issue with a blank project. I have now instead of adding the package that has the firebase analytics as a dependency to my second package, I have just added the firebase analytics to the target dependencies of the second package and im hoping that builds and runs. So for now I'll have use Analytics framework directly rather than having a separate package for it which I didn't really want to do but I'm running out time to spend on this issue. Hopefully someone else can do some more digging and find the cause. |
@ryanwilson unfortunately that didn't work either ... soon as I add the target dependency: |
The problem with GoogleAppMeasurement.plist also it's reproduced with Carthage |
Same issue concerning the simulator but it's not totally the same errorr. I thought maybe there was a cache conflict with cocoapods because I had installed FirebaseAnalytics before with this pod. Everything is clean and cached, Pods are completely remove from the project so it's a possibility that has been ruled out.
|
@Neilfau @coulonb Is there anything different about Build Settings between the new project and the project that demonstrates the issue? Are you able to incrementally add to the new project or remove from the broken project to isolate what triggers the problem? If anyone can share a reproducible example, it would be helpful. |
@paulb777 I looked carefully line by line and I saw nothing that changes in the build settings. |
@paulb777 I couldn't see anything in the build settings and ive tried adding other packages incrementally but not class files as its a big project and would take me a long time and don't think that would have anything to do with it anyway and I have only one class that imports FirebaseDatabase and one class for analytics. |
I have an update about this issue... I now have it kind of working. So the structure of my app is like the following:
If the I would also add that I am now using the 6.32-spm-beta branch and I had to remove the following from my package file because it caused the package to fail:
Hope this might help point you in the right direction. |
Hello @paulb777 I have the same issue. And I was able to reproduce it with new project. Was doing nothing special, just created new xcode project. Set it up with deployment target for iOS 12 and just add few swift packages with Firebase. And it shows same error about missing Info.plist on running for simulator. You can checkout this demo project here: https://github.com/goncharik/XCFrameworkSPMDemo Please advice what am I doing wrong. |
Aha, thanks for the project @goncharik! I now see the issue with the project you provided. Digging into it now to see if I can track this down. I thought this may have been an project that targets iOS < 13 issue but after creating a new project and modifying it appropriately to run on iOS 10, adding Firebase to it via SwiftPM, I was still unable to reproduce the issue. @Neilfau re: removing the |
@ryanwilson ok great! Yeah my project targets iOS 13.0+ so I don't think its that. |
My project is also 13+ |
Thanks for the repro case @goncharik ! We were able to isolate and fix. To pick up the fix - File -> Swift Packages -> Update to Latest Package Versions We were able to isolate to missing |
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Hi,
I try to install FirebaseAnalytics from the SPM, and after compiling an error appears and the application doesn't install. I specify that the problem appears when I try to install FirebaseAnalytics. No problems with FirebaseCrashlytics and Firebase.
The -ObjC flag is well added.
The text was updated successfully, but these errors were encountered: