react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

'FirebaseCore/FirebaseCore.h' file not found -- only on iOS Release config

Open azraelx23 opened this issue 8 years ago • 60 comments

Issue

Build failed on Release configuration when trying to Archive, however works fine on Debug configuration on Run. Already tried delete Pods and node_modules, reinstall over and over again, same result. Moving to earlier RNFirebase version 4.1.0 ( with pod 'Firebase/Core', '~> 4.13.0' ) , is not an option since the Firebase/Functions module has runtime error on that particular version, even though the Archive/Release is successful using that version

Build error:

'FirebaseCore/FirebaseCore.h' file not found

Podfile

target 'App' do
  use_frameworks!

  pod 'AppCenter/Crashes', '~> 1.6.1'
  pod 'AppCenter/Analytics', '~> 1.6.1'
  pod 'AppCenterReactNativeShared', '~> 1.5.1'

  # Required by RNFirebase
  pod 'Firebase/Core'
  pod 'Firebase/Functions'
  pod 'Firebase/Auth'
  pod 'Firebase/Database'
  pod 'Firebase/DynamicLinks'
  pod 'Firebase/Firestore'
  pod 'Firebase/Messaging'
  pod 'Firebase/RemoteConfig'

end

Environment

  1. Application Target Platform: iOS
  2. Development Operating System: macOS High Sierra 10.13.4
  3. Build Tools: XCode 9.4
  4. React Native version: 0.55.3
  5. RNFirebase Version: 4.2.0
  6. Firebase Module: Core, Functions, Auth, Firestore, Messaging
screen shot 2018-06-01 at 17 44 30

azraelx23 avatar Jun 01 '18 10:06 azraelx23

Looks like this is a use_frameworks issue. Either comment this out, or you'll have to explicitly set some dependencies as per the instructions here: https://github.com/invertase/react-native-firebase/releases/tag/v3.2.2

chrisbianca avatar Jun 03 '18 13:06 chrisbianca

@chrisbianca I did as was suggested on the link to no avail, I needed to use 'use_frameworks' for some of the other libraries, and looks to me it's not finding the headers for some reason, and the other strange thing is that it always works on Debug config. Is there any other suggestions?

screen shot 2018-06-04 at 01 47 04

azraelx23 avatar Jun 03 '18 18:06 azraelx23

Having this same issue since I upgraded to the latest firebase version

osiloke avatar Jun 04 '18 08:06 osiloke

@azraelx23 try taking a look at the header, library and framework search paths for your project and see how release compares to the debug settings? It could be that something has got out of sync in your project.

chrisbianca avatar Jun 04 '18 12:06 chrisbianca

I have the same issue any solution?

DMRE avatar Jun 04 '18 19:06 DMRE

@chrisbianca checking differences between the two schemes was the first thing I did since I have also been developing iOS apps for several years, did not find any kind of differences between the two. Can you consider reopening this issue since more people also experienced the same thing using the latest build?

azraelx23 avatar Jun 05 '18 03:06 azraelx23

https://github.com/invertase/react-native-firebase/issues/1106 might be related

azraelx23 avatar Jun 05 '18 03:06 azraelx23

Is there any solution? Facing the same issue

oferRounds avatar Jun 06 '18 01:06 oferRounds

@azraelx23 did you find some solution? I also need the use_frameworks

oferRounds avatar Jun 06 '18 01:06 oferRounds

@chrisbianca facing the same issue, tried also your workaround but no luck... Any idea?

oferRounds avatar Jun 06 '18 01:06 oferRounds

@oferRounds for now, I ended up moving back to RNFirebase 4.1.0, specifically: on package.json:

"react-native-firebase": "4.1.0",

and then on podfile:

  pod 'Firebase/Core', '~> 4.13.0'
  1. delete all node_modules, Pods folder, xcworkspace file
  2. do clean build on xcode, delete all derived data
  3. do npm install, then 'pod update' since you need to make sure the Pods are using that version
  4. try a build, it should work.

Firebase functions do not work though, so for that I had to resort to use https request instead of using the callable method.

azraelx23 avatar Jun 06 '18 03:06 azraelx23

@chrisbianca firebase.functions() is only working for me in debug mode, and we do not use use_frameworks.

  pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios/RNFirebase.podspec'
  pod 'Firebase/Core'
  pod 'Firebase/AdMob'
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Database'
  pod 'Firebase/Functions'
  pod 'Firebase/Performance'
  pod 'Firebase/RemoteConfig'
  pod 'Firebase/Storage'
  pod 'Fabric', '~> 1.7.2'
  pod 'Crashlytics', '~> 3.9.3'

react-native: 0.55.4 react-native-firebase: 4.2.0

We get this only when running release builds:

*** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: You attempted to use a firebase module that's not installed natively on your iOS project by calling firebase.functions().



Ensure you have the required Firebase iOS SDK pod for this module included in your Podfile, in this instance confirm you've added "pod 'undefined'" to your Podfile

EDIT: I got it working the next day. Cocoapods was being screwy.

willbattel avatar Jun 06 '18 04:06 willbattel

@azraelx23 thanks! The thing is that I’d like to use the Messaging, which is available only on 4.2+...

@chrisbianca I literally tried every clean, restart, delete, including the linkage of my pods as suggested. All in vain.. Any idea/workaround?

oferRounds avatar Jun 06 '18 07:06 oferRounds

I am facing the same issue. Appreciate any help.

okuzenko avatar Jun 10 '18 19:06 okuzenko

Did someone find any solution (for using the latest version)?

oferRounds avatar Jun 14 '18 22:06 oferRounds

I have been trying all day to resolve this issue, if anybody has an update on this please let us know!

Benjumali avatar Jun 22 '18 15:06 Benjumali

can we please re-open this issue?

oferRounds avatar Jun 23 '18 23:06 oferRounds

Having same issue, would also vote to re-open this issue

abe732 avatar Jun 25 '18 00:06 abe732

Managed to build an archive after trying the whole day, now investigating what exactly made it work!

Benjumali avatar Jun 25 '18 14:06 Benjumali

Seeing the same issue. Had everything good to go till I added in Firestore and updated the packages. Now its failing.

djneely avatar Jun 25 '18 17:06 djneely