Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

iOS: No able to co-existing with cordova-plugin-firebase-analytics #2914

Open
xinfengmich opened this issue May 15, 2020 · 4 comments
Open

Comments

@xinfengmich
Copy link

Expected Behaviour

Install both phonegap-plugin-push and cordova-plugin-firebase-analytics in the same project.
Also see #2796

Actual Behaviour

cordova plugin add phonegap-plugin-push --variable FCM_VERSION=17.4.0
Installing "phonegap-plugin-push" for ios
"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
Running command: pod install --verbose
Failed to install 'phonegap-plugin-push': Error: pod: Command failed with exit code 1
at ChildProcess.whenDone (/Users/xinfeng/Documents/learn/sample/node_modules/cordova-common/src/superspawn.js:135:23)
at ChildProcess.emit (events.js:209:13)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
pod: Command failed with exit code 1
[ERROR] An error occurred while running subprocess cordova.

    cordova plugin add phonegap-plugin-push --variable FCM_VERSION=17.4.0 exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more information.

$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "FirebaseAnalytics":
In snapshot (Podfile.lock):
FirebaseAnalytics (= 6.4.2)

In Podfile:
Firebase/Analytics (~> 6.23.0) was resolved to 6.23.0, which depends on
Firebase/Core (= 6.23.0) was resolved to 6.23.0, which depends on
FirebaseAnalytics (= 6.4.2)

FirebaseMessaging (~> 2.0.0) was resolved to 2.0.8, which depends on
  FirebaseAnalytics (~> 4.0)

Reproduce Scenario (including but not limited to)

$ cordova plugin add cordova-plugin-firebase-analytics --variable FIREBASE_ANALYTICS_VERSION="16.+"

$ cordova plugin add phonegap-plugin-push --variable FCM_VERSION="17.4.0"

Cordova CLI version and cordova platform version

Cordova CLI : 9.0.0 ([email protected])
cordova-android: ^8.0.0
cordova-ios: ^5.1.0

Plugin version

phonegap-plugin-push : 2.2.3 or 2.3.0
cordova-plugin-firebase-analytics: v0.14.0 above to the latest V4.3

Sample Push Data Payload

Sample Code that illustrates the problem

Logs taken while reproducing problem

@fzamperin
Copy link

I'm having the same problem when using both plugins, tried pop repo update and updating cocoapods version but none worked... Any workarounds?

@xinfengmich
Copy link
Author

xinfengmich commented May 28, 2020

Underlying firebase version is conflict. Check on plugin.xml, <framework src="FirebaseMessaging" type="podspec" spec="~> 2.0.0" /> is older than cordova-plugin-firebase-analytics using.

[email protected] can co-exists with [email protected]

@shprink
Copy link

shprink commented Jun 3, 2020

@xinfengmich yes your solution works for iOS. however it does not for Android:

A problem occurred evaluating project ':app'.
> Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
   > All firebase libraries must be either above or below 14.0.0

@xinfengmich
Copy link
Author

Remove both, and try following
$ ionic cordova plugin add [email protected] --variable FCM_VERSION="17.4.0"
$ ionic cordova plugin add [email protected] --variable FIREBASE_VERSION="16.0.0"

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

No branches or pull requests

3 participants