1
votes

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.

1
I use this versions, so you can try it, and everything works as expected: "@ionic-native/firebase": "^4.17.0", "cordova-plugin-firebase": "^2.0.5","@ionic-native/google-plus": "^4.9.1", "cordova-plugin-googleplus": "^5.3.0". + <preference name="android-minSdkVersion" value="19" />Tomislav Stankovic
@TomislavStankovic I tried these exact versions, but they still give the same result. Are you compiling for Ios or only for android? (problem is for IOS; for Android the problem is resolved by picking the correct versions for each Firebase component)S. Roose
@S .Rose I compile for iOS <engine name="ios" spec="4.5.5"/>Tomislav Stankovic

1 Answers

1
votes

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.