React-native-firebase: framework not found FIRAnalyticsConnector

Created on 6 Jun 2019  路  15Comments  路  Source: invertase/react-native-firebase

hello there i have exactly followed the ios instruction guide mentioned in the docs,
but whenever i try to run the app i get the error
ld: framework not found FIRAnalyticsConnector

i have tried commenting the use_frameworks in the podifile, tried pod repo update, and removing the podfile and reinstall it.

i would really appreciate helping me out

full output

`Ld /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/Bashi.app/Bashi normal x86_64 (in target: Bashi)
cd /Users/barez/Desktop/Bashi/ios
export IPHONEOS_DEPLOYMENT_TARGET=9.0
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk -L/Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator -L/Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/FirebaseCore -L/Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/FirebaseInstanceID -L/Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/GoogleUtilities -L/Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/nanopb -F/Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator -filelist /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Intermediates.noindex/Bashi.build/Debug-iphonesimulator/Bashi.build/Objects-normal/x86_64/Bashi.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -Xlinker -object_path_lto -Xlinker /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Intermediates.noindex/Bashi.build/Debug-iphonesimulator/Bashi.build/Objects-normal/x86_64/Bashi_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lFirebaseCore -lFirebaseInstanceID -lGoogleUtilities -lc++ -lnanopb -lsqlite3 -lz -framework FIRAnalyticsConnector -framework FirebaseAnalytics -framework FirebaseCoreDiagnostics -framework Foundation -framework GoogleAppMeasurement -framework Security -framework StoreKit -framework SystemConfiguration -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Intermediates.noindex/Bashi.build/Debug-iphonesimulator/Bashi.build/Bashi.app-Simulated.xcent -framework MobileCoreServices -framework QuartzCore -framework AVFoundation -framework OpenGLES -framework CoreVideo -framework CoreMedia /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTBlob.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTAnimation.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libReact.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTNetwork.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTVibration.a /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -lRNGestureHandler -lRNVectorIcons -lRNSpinkit /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/GPUImage.framework/GPUImage -lRCTVideo -lRNShare -lRNCamera -lRNImagePicker -lRNDeviceInfo -lRNFetchBlob -lFastImage -lRCTImageResizer -lRNZipArchive -lz -lSplashScreen -lRCTRestart -lRNCNetInfo -lRNFirebase -lPods-Bashi -framework FIRAnalyticsConnector -Xlinker -dependency_info -Xlinker /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Intermediates.noindex/Bashi.build/Debug-iphonesimulator/Bashi.build/Objects-normal/x86_64/Bashi_dependency_info.dat -o /Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/Bashi.app/Bashi

ld: framework not found FIRAnalyticsConnector
clang: error: linker command failed with exit code 1 (use -v to see invocation)`

All 15 comments

Have you checked this? https://stackoverflow.com/questions/37717889/framework-not-found-firebaseanalytics

From https://github.com/invertase/react-native-firebase/issues/1678

If it works, I'm curious how it got into that state.

Because I don't see it here even though analytics installs by default so should be in the automated reproduction: https://github.com/mikehardy/rnfbdemo

@mikehardy i did look at the StackOverflow link, i do apologize im a bit new on mac but can you explain where i can find this in and set it in Xcode.

image

thanks in advance

Not 100% but it should be in Info -> build settings when you select the project

I'm not great at mac either unfortunately
I do have this demo project you can use to check them https://github.com/mikehardy/rnfbdemo or you can look at the official starter https://github.com/invertase/react-native-firebase-starter/

the weird thing is that the FIRAnalyticsConnector.framework is present in the pod folder
Screen Shot 2019-06-06 at 12 18 54 PM

i will try the official starter project to see what will i get

@mikehardy the react-native-firebase demo app successfully compiled and ran, i did the same steps as i did for configuring rnfirebase to my project that is having the error!!, what im doing wrong here?

I can't be sure. I know there are few things though, like maybe using legacy build system? I wish I could help more but I'm an Android person doing react-native now and I stayed away from Xcode in general because of things like this, it makes me :nauseated_face: ;-)

@mikehardy i somehow got passed that error, now im getting a new one which says

library not found for -lGoogleToolboxForMac

the output

ld: warning: directory not found for option '-L/Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac' ld: warning: directory not found for option '-L/Users/barez/Library/Developer/Xcode/DerivedData/Bashi-fgntnriedrdxychhlbcojjkptejc/Build/Products/Debug-iphonesimulator/Protobuf' ld: library not found for -lGoogleToolboxForMac

well that's a dependency of one of the pods, I would make sure you did a pod install (maybe do a pod update instead of install?) and try again. If not, then maybe a pod deintegrate and then a pod install (though that might revert whatever you did to get past the first error. I'm no expert though, I'm still just guessing

I saw the answer somewhere, unfortunately, I forgot the link where i found so I can credit the person who did it.

basically, his solution was this:
1- save a copy of your ios folder.
2- delete the ios folder in your project.
3- cd your-project and do react-native eject. this will create the ios folder.
4- first link react-native-firebase, mentioned in the docs.
5- then link your other libraries.

but this solution didn't work for me because whenever i was linking other libraries, it was adding it to the podfile, unfortunately, so I did this with the help of his solution:
my solution was:
1- save a copy of your ios folder.
2- delete the ios folder in your project.
3- cd your-project and do react-native eject. this will create the ios folder.
4- cd ios, and pod init and following the react-native-firebase pod installation.
5- remove the podfile.lock, pod, and project.xcworkspace to the trash(you can save them anywhere you like, just remove them from the ios project).
6- cd .., go to your project root, and react-native link.
7-go to trash(or the place where you saved the podfile,pod,project.xcworkspace). and add them back to the ios folder.
8- clean, and build.

i hope this helped.

Note: i may reopen this issue if i ever encounter the issue again.

https://github.com/rhdeck/react-native-linknopod

In general react-native link will prefer a pod link if it sees a podspec, but there are other ways to workaround it like maybe that library above

That's a react-native CLI issue

@A7madXatab Im having a similar issue, been trying to sort it for a couple of days.

Created a pod and followed every step, and yet initially got an error message:

FirebaseCore/FirebaseCore.h' file not found
Sorted that out by adding in Podfile:

post_install do |installer|
system("mkdir -p Pods/Headers/Public/FirebaseCore && cp Pods/FirebaseCore/Firebase/Core/Public/* Pods/Headers/Public/FirebaseCore/")
end

And now it's returning the following error:

'''ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/BoringSSL-GRPC'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/FirebaseCore'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/FirebaseCoreDiagnostics'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/FirebaseFirestore'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/GoogleDataTransport'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/GoogleDataTransportCCTSupport'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/GoogleUtilities'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/abseil'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/gRPC-C++'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/gRPC-Core'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/leveldb-library'
ld: warning: directory not found for option '-F/Users/hassanrahhal/Library/Developer/Xcode/DerivedData/FirebaseTest-fpfbkuabpwiavwakyjofavvdmney/Build/Products/Debug-iphonesimulator/nanopb'

ld: framework not found FirebaseCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)'''

@hassrahhal I would open a new issue, following the template. But first make absolutely sure you are opening the .xcworkspace file, not the .xcproject. Pods moves things to workspace and errors like yours can happen otherwise I believe

@mikehardy completely forgot about workspace. Thanks

Was facing the exact same issue as posted by @A7madXatab, this comment help me resolve the issue - https://stackoverflow.com/a/64183786/6660488

Basically you have to set Build Active Architecture Only to Yes for both Release and Debug. In my case Release was set to No.

Hope it helps someone.

Thanks @SurajMDurgad ! good call

Was this page helpful?
0 / 5 - 0 ratings