Hello,
I have a problem building my app on ios platform.
Please note on the android it works fine.
So I followed successfully the ios setup
but when I build with xcode 10, I'm getting ld: library not found for -lFirebaseCore
Same issue as this
for debug and release.
I've tried changing to Legacy Build System as described, changed also the Build location
to custom paths.
The full message:
Ld build/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp normal x86_64
cd /Users/zero/Workspace/MyApp-mobile-app/ios
export IPHONEOS_DEPLOYMENT_TARGET=11.4
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/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.0.sdk -L/Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator -F/Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator -F/Users/zero/Workspace/MyApp-mobile-app/ios/Pods/FirebaseAnalytics/Frameworks -F/Users/zero/Workspace/MyApp-mobile-app/ios/Pods/FirebaseInstanceID/Frameworks -F/Users/zero/Workspace/MyApp-mobile-app/ios/Pods/GoogleAppMeasurement/Frameworks -F/Users/zero/Workspace/MyApp-mobile-app/ios -filelist /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=11.4 -Xlinker -object_path_lto -Xlinker /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lFirebaseCore -lGoogleUtilities -lc++ -lnanopb -lsqlite3 -lz -framework FIRAnalyticsConnector -framework FirebaseAnalytics -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework Foundation -framework GoogleAppMeasurement -framework Security -framework StoreKit -framework SystemConfiguration -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/MyApp.app-Simulated.xcent /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTBlob.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTAnimation.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libReact.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTNetwork.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTVibration.a /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -lCodePush -lRNI18n -lRNVectorIcons -lRNFetchBlob -lc++ -lRNBackgroundTimer -lAirMaps -lRNDeviceInfo -lPods-MyApp -Xlinker -dependency_info -Xlinker /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/MyApp_dependency_info.dat -o /Users/zero/Workspace/MyApp-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp
ld: library not found for -lFirebaseCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ios/Podfile:platform :ios, '11.4'
target 'MyApp' do
pod 'Firebase/Core'
end
AppDelegate.m:#import "AppDelegate.h"
#import <CodePush/CodePush.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <Firebase.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
#ifdef DEBUG
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
// jsCodeLocation = [CodePush bundleURL];
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
[FIRApp configure];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"MyApp"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
@end
android/build.gradle:// N/A
android/app/build.gradle:// N/A
android/settings.gradle:// N/A
MainApplication.java:// N/A
AndroidManifest.xml:<!-- N/A -->
iOS 11.4 or iOS 9.0 e.g. iOS 10 or Android API 28N/AN/AN/AXcode 10 e.g. Xcode 10, Android Studio 3.2React Native version:0.57.4React Native Firebase library version:5.0.0Firebase module(s) you're using that has the issue:TypeScript?3.1.5ExpoKit?ExpoKitN/A
Think react-native-firebase is great? Please consider supporting the project with any of the below:
React Native Firebase and Invertase on TwitterSeems that I messed something inside the /ios, that's why it wasn't building..
I'm using the ignite boilerplate for my project and I regenerated the project and then replaced the ios/ folder
with my actual, re-linked everything and now it's working fine.
hey @mkchx I'm facing the same issue with my ionic app. Can you tell what fixes worked for you in that /ios folder?
Thanks
Anyone know the steps to fix this? i faced this issue also.
Did you install the library for iOS correctly?
Guid -> https://github.com/invertase/react-native-firebase-docs/blob/master/docs/installation/ios.md
What's in your pod file?
Pod update works Thanks
I'm facing this too , it is only failing in release , related to https://github.com/invertase/react-native-firebase/issues/1563 . pod update , reinstalling and cleaning haven't worked.
@sattaman this is a closed issue, please open a new issue if you have problems, following the provided template, so others can help. Note that the current instructions do not work well for me when integrating react-native-firebase v5.x.x, but I have a partial solution while I work with the maintainers on a full fix, visible here #2163
Most helpful comment
hey @mkchx I'm facing the same issue with my ionic app. Can you tell what fixes worked for you in that /ios folder?
Thanks