chemerisuk / cordova-plugin-firebase-analytics

Cordova plugin for Firebase Analytics
MIT License
154 stars 305 forks source link

Failed to install firebase-analytics in iOS #209

Closed Jasphine closed 6 months ago

Jasphine commented 1 year ago

Hi,

I get this error when i tried to install this plugin in iOS: Failed to install 'cordova-plugin-firebase-analytics': Error: pod: Command failed with exit code 31 at ChildProcess.whenDone (/Documents/xxxxx/node_modules/cordova-common/src/superspawn.js:136:25) at ChildProcess.emit (node:events:527:28) at maybeClose (node:internal/child_process:1092:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) pod: Command failed with exit code 31

Any solutions? Appreciate your help.

Jasphine commented 1 year ago

@chemerisuk please help.... very much appreciate...

omnisecret commented 1 year ago

hello, I have the same problem... any help?

Jasphine commented 1 year ago

I realize that this issue happened if we installed the cordova-push-plugin and we will not able to install this plugin, unless we set the variables IOS_FIREBASE_POD_VERSION to same with the one use in cordova-push-plugin.

What I did to solve this is :-

  1. check/get the IOS_FIREBASE_MESSAGING_VERSION from plugin.xml (cordova-push-plugin). for example <preference name="IOS_FIREBASE_MESSAGING_VERSION" default="~> 6.32.2"/>
  2. cordova plugin add cordova-plugin-firebase-analytics --variable IOS_FIREBASE_POD_VERSION="6.32.2"

With this way, I can installed this plugin successfully.

@omnisecret , hope this help.

Thanks.

Brianfit commented 11 months ago

You can also install without Cocoapods by going to File > Add packages in Xcode and pasting in the following URL: https://github.com/firebase/firebase-ios-sdk

The instructions in step 4 here refer: https://goo.gl/ctyzm8