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

Request for Platform-Specific Plugin Installation or Initialization #221

Open
pierpaolovannidocplanner opened this issue Apr 8, 2024 · 1 comment

Comments

@pierpaolovannidocplanner

Hello,

I'm currently working on a Cordova project that targets both Android and iOS platforms. I've integrated the cordova-firebase-plugin-analytics to utilize Firebase Analytics for my application.
However, due to certain project constraints, I'm looking to enable Firebase Analytics exclusively for the Android platform and not for iOS.
I do not have the GoogleService-Info.plist and due to some project limitations I am unable to recover this file

Once installed the plugin and built my iOS application without the GoogleService-Info.plist file, the build fails, and I encounter the following error in Xcode:

Thread 1: "`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/."

So Firebase is expecting the configuration file even before the app starts, preventing the app from launching.

Is there a way to install the plugin only on Android or make sure that on the iOS the initialization of Firebase is somehow skipped?

On the documentation i can read those lines:
Put google-services.json and/or GoogleService-Info.plist into the root directory of your Cordova project
The and/or make me think i don't need to have a GoogleService-info.plist file into the ios project.

@chemerisuk
Copy link
Owner

Create a fork of this repo where remove ios tag from plugin.xml. Use this fork in your project instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants