Ad

Solve Incompatibility Cordova Firebase And Google Login In Ios

Project: Ionic3 app using Firebase (for auth, db and push messages) and Google-login

Problem: Undefined symbols for architecture .. while compiling for IOS. The problem is probably an incompatibility between these two cordova plugins. See this defect for details

Versions used:

  • @ionic-native/firebase: 4.16.0
  • cordova-plugin-firebase : 2.0.5
  • @ionic-native/google-plus: 4.20.0
  • cordova-plugin-googleplus: 7.0.1

Since upgrading to ionic4 is not yet an option and both plugins are needed, we are looking for a workaround.

Ad

Answer

The solution (workaround) for this issue is to replace the cordova-plugin-firebase with a forked version:

"cordova-plugin-firebase": "git+https://github.com/vash15/cordova-plugin-firebase.git#master",

You also need to add cordova-plugin-cocoapod-support:

"cordova-plugin-cocoapod-support": "1.6.0",

In your config.xml, you can set the versions of the different firebase components:

<platform name="ios">
    <preference name="pods_ios_min_version" value="9.0" />
    <preference name="pods_use_frameworks" value="true" />
    <pod name="Firebase/Core" version="5.20.0" />
    <pod name="Firebase/Auth" version="5.20.0" />
    <pod name="Firebase/Messaging" version="5.20.0" />
    <pod name="Firebase/Performance" version="5.20.0" />
    <pod name="Firebase/RemoteConfig" version="5.20.0" />
    <pod name="Firebase/DynamicLinks" version="5.20.0" />
    <pod name="Fabric" version="1.9.0" />
    <pod name="Crashlytics" version="3.12.0" />

Note: you might also need to install the GoogleSignIn pod.

Ad
source: stackoverflow.com
Ad