react-native-firebase doesn't work with v0.50.0 of react-native

Created on 21 Nov 2017  路  5Comments  路  Source: invertase/react-native-firebase

Issue

React-native-firebase doesn't work with v0.50.0 of react-native.

When running react-native link react-native-firebase gets automatically added to the PodFile. This also causes React 0.11.0 to be included which leads to the issue.

This upstream change is probably responsible:
https://github.com/facebook/react-native/commit/4c196aec902fa0b9187e11f964aed0941778a2ae

Environment

  1. Application Target Platform: iOS
  2. Development Operating System: not relevant
  3. Build Tools: not relevant
  4. React Native version: 0.50.0
  5. RNFirebase Version: not relevant
  6. Firebase Module: N/A
iOS React Native

Most helpful comment

We're still trying to come up with the best way forward.

If we remove the .podspec file, it would fix the issue for new users, but would break backwards compatibility for people that have been using the .podspec file to link their library in the past.

In the short term, if you run into this issue, you can do the following:

  1. react-native unlink react-native-firebase
  2. rm node_modules/react-native-firebase/RNFirebase.podspec
  3. react-native link react-native-firebase

This will ensure that the library is linked using the xcode project rather than as a pod.

All 5 comments

I am using rn 0.50 with rn-firebase 3.2, you need to follow all the upgrade and migration instructions in the react native release notes from where ever you were to 0.50

@olivierlesnicki You're right, this does break thanks to the RN changes - I'll try and figure out a way to fix it without removing our Podspec file...

See: https://github.com/facebook/react-native/pull/15460#issuecomment-346295149

We need to think about the best way to approach this as currently there's no way of overriding the behaviour that has been added to RN 0.50 :(

We're still trying to come up with the best way forward.

If we remove the .podspec file, it would fix the issue for new users, but would break backwards compatibility for people that have been using the .podspec file to link their library in the past.

In the short term, if you run into this issue, you can do the following:

  1. react-native unlink react-native-firebase
  2. rm node_modules/react-native-firebase/RNFirebase.podspec
  3. react-native link react-native-firebase

This will ensure that the library is linked using the xcode project rather than as a pod.

This has now been fixed as part of v3.2.0

Was this page helpful?
0 / 5 - 0 ratings