Closed stereodenis closed 6 years ago
I'm encountering the same issue, any known workarounds on this?
Was getting the same error. So as per the comment @dluksza in #1106 Updated podfile to use version 4.2.0
pod 'Firebase/Core','4.2.0'
pod 'Firebase/Messaging','4.2.0'
But this instead gave me following error while creating a debug build.
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RNFirebaseMessaging messaging:didRefreshRegistrationToken:]: unrecognized selector sent to instance 0x137ebbd20'
You need to make sure you are on:
Javascript:
react-native-firebase
: v4.2.0
Pods:
Firebase/Core
: v5+
This is explained in the v4.2.0 release notes.
Once you have updated your pods and npm libraries, please make sure you clean your build within XCode (I suggest restarting once you have), and then rebuilding. This is definitely a case of npm/pods/Xcode getting out of sync and there are no issues when everything is correctly installed.
@chrisbianca thanks. Did a pod update
which somehow fixed the issue.
I am facing
FirebaseCore/FirebaseCore.h not found
I am on v4.2 and my pods are updated and Firebase is > 5.0
Any help?
Cocoapods can be tough to work it, some thoughts:
@rikur tried it couple of times. Same issue persists.
I get
'FirebaseCore/FIRAnalyticsConfiguration.h' file not found
when trying to archive. Deleted pods and node_modules and reinstalled them but didn't help.
FirebaseCore/FirebaseCore.h not found
when trying to archive.
I got the same issue. This issue is not resolved yet.
My solution is downgrade to RNFirebase
to 4.1.0
, Firebase/Core
and Firebase/Message
to ~> 4.13
@wanbok if you archive app does everything work normally? Are you using Firebase Functions? Care to share your Podfile lines for all Firebase dependencies?
FirebaseCore/FirebaseCore.h not found
same issue when trying to archive. Run on device works fine, only archive is failing
How come this issue is closed? I have the same issue. Doesn't seem resolved.
yep same issue here
Same here~
+1
I have same issue that the author reported. I've tried clean & archive, pod install
without use_frameworks!
, pod update
and restart Xcode.
Podfile:
target '...' do
use_frameworks!
# Pods for AppCenter
pod 'AppCenter/Crashes', '~> 1.4.0'
pod 'AppCenterReactNativeShared', '~> 1.3.0'
pod 'AppCenter/Analytics', '~> 1.4.0'
# Pod for Firebase
pod 'Firebase/Core'
platform :ios, '10.0'
end
react-native-firebase: 4.2.0 firebase-ios-sdk: v5
I am successfully running it on simulator.
Update:
I decided to downgrade to react-native-firebase 4.1.0 and firebase sdk 4.13.0. After which, I began to have issues finding other react-native libraries and so I manually linked each library (instead of react-native link
). Then, continued to have issues with Pods framework script and so I pod install
again and I got warnings about PODS_CONFIGURATION_BUILD_DIR
and I followed the suggested by updating to $(inherited)
and then ran pod install
again. And so no more warnings and I then proceeded to add user defined setting REACT_HEADER_PATH
set to ${PODS_BUILD_DIR}/Release$(EFFECTIVE_PLATFORM_NAME)/include
for my custom build configurations and added to header search paths set to recursive. I tested archiving each build configuration it was back to normal.
Using npm list
my current versions
* React Native version: 0.55.4
* react-native-firebase@4.2.0
I updated my podfile according to this Medium article After that I am successfully able to create an archive build. On validating it did pass validation. Could you please try updating your podfile accordingly
This issue does not seem to be resolved, have not found a decent solution.
+1
Hmmm same for me archive is failing, I can run the app on the simulator! It's been painful to try and fix haha! Help!
any solution? someone?
@chrisbianca could you please update us here? Apologies but my production release is pending because of this 😅
@vishal-android-freak
Actually I was just able to solve it (finally!) by removing the use_frameworks
from the pod file, while using a 1.5+ version of cocoa pods, and adding the :modular_headers => true
for specific pods which depend on Obj-C code.
More info can be found here: http://blog.cocoapods.org/CocoaPods-1.5.0/
I can confirm deleting pods folder, pod lock files and xcworkspace file, remove use_frameworks
from Podfile and reinstalling has fixed the issue. Will observe for few days and revert if I see some changes. Thankyou @oferRounds 👍
@chrisbianca @oferRounds @vishal-android-freak perhaps you could help me.
I have the exact same problem, I have struggled with this issue for weeks, and have tried everything, also the suggestions mentioned here.
In my react native app i also use the react-native-mapbox, and it seems like some of the stuff used for this has an effect on firebase.
Perhaps some of you could show me a full guide to add firebase manually, seems like that could help, I cant really find any tutorials how to do this on new versions of xCode.
use_frameworks!
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
pod 'React', path: '../node_modules/react-native', subspecs: [
'Core',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTBlob',
'RCTCameraRoll',
'RCTGeolocation',
'RCTImage',
'RCTNetwork',
'RCTPushNotification',
'RCTSettings',
'RCTTest',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'RCTLinkingIOS'
]
pod 'react-native-mapbox-gl', :path => '../node_modules/@mapbox/react-native-mapbox-gl'
pod 'Firebase/Core' pod 'Firebase/Auth' pod 'Firebase/Database'
@Friis1978 remove use_frameworks!
from pod file and delete Pods folder, lockfile xcworkspace, etc. and do pod install
again
@vishal-android-freak Thank you very much, I had already done that several times, bu this is what I did, which worked (finally):
This is the Seach paths from my project:
And this is the podfile content:
target 'guard4me' do
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
pod 'React', path: '../node_modules/react-native', subspecs: [
'Core',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTBlob',
'RCTCameraRoll',
'RCTGeolocation',
'RCTImage',
'RCTNetwork',
'RCTPushNotification',
'RCTSettings',
'RCTTest',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'RCTLinkingIOS'
]
pod 'react-native-mapbox-gl', :path => '../node_modules/@mapbox/react-native-mapbox-gl'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'Firebase/Core', '~> 4.13.0' pod 'Firebase/Auth' pod 'Firebase/Database' pod 'RNBackgroundFetch', :path => '../node_modules/react-native-background-fetch' end
@Friis1978 I am glad it is finally all good and working :)
Same here.
'FirebaseCore/FirebaseCore.h' file not found
when doing Archive
@NirpE Sorry for a late response. Everything that I used, works normally. But I use it with just a few functions.
Same problem for me, the only workaround that worked was downgrading to 4.1.0 😞
I solved this problem by upgrading my packages. RN 0.56, RNF 5.0-rc1, pod Firebase/Core 5.6
same problem for me, issue RN 0.56, RNF 5.0-rc1, pod Firebase/Core 5.6
Any oficial solution for this issue?
pod install
It should be solved.
@oferRounds I'm trying to figure the solution I should use on my end.
You see our project is an Objective-C project that requires a swift library (PromiseKit) - and not the opposite.
If I just remove use_frameworks!
from our podfile, it won't build because libraries like swiftCoreFoundation
will be missing.
What is the right way to remove use_frameworks!
AND keep those swift pods working?
Here's my podfile:
platform :ios, '10.0'
target 'TestApp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Tried removing use_frameworks
# Tried adding modular_headers but it doesn't seem to work
pod 'PromiseKit', :modular_headers => true
# react-native-firebase
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/DynamicLinks', '~> 5.3.0'
pod 'Firebase/Messaging', '~> 5.3.0'
end
Thank you
@SudoPlz have you tried the things here? https://github.com/invertase/react-native-firebase/issues/1106#issuecomment-405030305
@oferRounds I have tried adding :modular_headers => true
next to pod 'PromiseKit'
as you can see above (after commenting out the use_frameworks!
line, but it still fails on build time, telling me that basic swift libraries like swiftCoreFoundation
were not found.
My cocoapods knowledge is not that great, but I did try that at least. Is that not what I was supposed to do?
@SudoPlz can you check which Cocoa Pods version are you using? It should be at least 1.5.0
https://stackoverflow.com/questions/18931091/how-to-check-a-version-of-a-cocoapods-framework
@oferRounds
pod --version
1.5.3
Got you. And which Xcode version?
Xcode 10.0 using the default (modern) Xcode build system
Got you... Then, sorry, for some reason this solution does not work for you. Not Sure what’s the reason. Obviously there is some issue with react-native-firebase
, I hope it will be fixed soon..
Cool, thanks for helping out on a Sunday man, I appreciate it.
Sure! :) Sorry I couldn’t solve it :\
I just removed the use_frameworks!
from my Podfile.
have been working this for more then three days, no matter how I tried, it just keep telling you , either Firebase not found or FirebaseCore/FirebaseCore.h not found.
I have just recently used the firebase starter with XCode 10.1/XCode10.2 (just came out) and it works.
I then carefully adapted what the starter did into my codebase (using RN0.59.1 even) and it works.
There are a million ways to mess up a build system but if it helps to know that the starter works so you have a template to look through, and that the current 5.x code works if you carefully pull the starter's style in, maybe you can move forward
@chrisbianca
"react-native": "0.54.0" "react-native-firebase": "^4.2.0"
What's wrong?