invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.54k stars 2.19k forks source link

[SOLVED with v2.1.1] Undefined symbols for architecture x86_6: _OBJC_CLASS_$_RNFirebaseDatabaseReference #321

Closed D1no closed 6 years ago

D1no commented 6 years ago

When compiling our project with RN-Firebase 2.0.5 I get a weird compilation error in xcode:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RNFirebaseDatabaseReference", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseDatabase.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I manually added react-native-firebase when it was at 2.0.0. We run the project via pods. Did something in the set-up change since than? I hate those kind of errors.....

image

platform :ios, '9.0'

target 'name' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
  # Pods for 'name'

  pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'BatchedBridge', # Required For React Native 0.45.0+
    'Core',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket'
    # Add any other subspecs you want to use in your project
  ]

  pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk/iOS'

  # Required by RNFirebase
  pod 'Firebase/Core'
  pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
  pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'

  # [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
  # pod 'Firebase/AdMob'
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Crash'
  pod 'Firebase/Database'
  pod 'Firebase/DynamicLinks'
  pod 'Firebase/Messaging'
  pod 'Firebase/RemoteConfig'
  pod 'Firebase/Storage'

  # Goolge Login
  pod 'GoogleSignIn'

  # Required by Code-Push
  pod 'CodePush', :path => '../node_modules/react-native-code-push'

  pod 'GoogleMaps'
  pod 'react-native-maps', path: '../node_modules/react-native-maps' #<- PATH to your node_modules/react-native-maps directory
  pod 'react-native-google-maps', path: '../node_modules/react-native-maps' #<- PATH to your node_modules/react-native-maps directory
end

# React-Native Maps
post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "react-native-google-maps"
      target.build_configurations.each do |config|
        config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
      end
    end
  end
end

Environment

  1. Target Platform (e.g. iOS, Android): iOS
  2. Development Operating System (e.g. macOS Sierra, Windows 10): MacOS Sierra
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): xCode Stable
  4. React Native version (e.g. 0.45.1): 0.46.3
  5. RNFirebase Version (e.g. 2.0.2): 2.0.5
D1no commented 6 years ago

Okay... if anybody comes accross this magic error, try this. It solved the problem (for now).

Close Xcode and packanger.

Clear Xcode Cache rm -rf ~/Library/Developer/Xcode/DerivedData

Go into ios folder cd ios

Clear CocoaPods Cache pod deintegrate && pod cache clean --all

Re-Install Pods pod install

The install can take now a veeery long time - if it seems to be stuck, you should re-setup cocoa with an update before installing again, as follows: gem install cocoapods (you maybe have to use sudo) than pod repo remove master --verbose && pod setup --verbose && pod install --verbose

than pod install

alfonsodev commented 6 years ago

same problem here, it can work when building with react-native run-ios, but it fails when archiving

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_RNFirebaseDatabaseReference", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseDatabase.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mindhivefi commented 6 years ago

I ran into a same issue. For the issue was fixed by upgrading to the latest cocoapods version and recreating the ios project.

Shinichi52 commented 6 years ago

i had same issue with RN 0.47.0 xcode: i built success. after i built with command line (react-native run-ios). it's not work with error message

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RNFirebaseDatabaseReference", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseDatabase.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

update: after i had run react-native unlink react-native-firebase. i tried re-build with command line. it alerted successful but it's crash when startup :(

react-native log-ios: Service exited due to Abort trap: 6
Damnum commented 6 years ago

Same here, the suggestions mentioned above don't help either.

chrisbianca commented 6 years ago

@Damnum @Shinichi52 @mindhivefi @alfonsodev @D1no I've just released v2.1.1 to hopefully fix the problem. Can you see if this fixes it for you?

Shinichi52 commented 6 years ago

Hi @chrisbianca, I tried upgrade v2.1.1 and re-install pod. When I ran app with command react-native run-ios. It's crash when startup. Run with xcode is working fine log with react-native log-ios

Aug 11 08:57:07 xxx-MacBook-Pro assertiond[67376] <Warning>: Submitted job with label: UIKitApplication:com.xxxxxx[0xf925][67376]
Aug 11 08:57:07 xxx-MacBook-Pro SpringBoard[67371] <Warning>: [com.xxxxxx] Bootstrap complete with label: UIKitApplication:com.xxxxxx[0xf925][67376]
Aug 11 08:57:07 xxx-MacBook-Pro com.apple.CoreSimulator.SimDevice.9EE8E2AC-9C13-43F6-A580-8E722572AC45.launchd_sim[67354] (UIKitApplication:com.xxxxxx[0xf925][67376][73582]) <Notice>: Service exited due to Abort trap: 6
Aug 11 08:57:09 xxx-MacBook-Pro assertiond[67376] <Warning>: Deleted job with label: UIKitApplication:com.xxxxxx[0xf925][67376]
Damnum commented 6 years ago

For me, this resolved the issue! Thanks @chrisbianca

For the record, for react-native run-ios to work I had to clean my Xcode Cache with

rm -rf ~/Library/Developer/Xcode/DerivedData

and delete the entire local build folder with

rm -rf ./ios/build

Ehesp commented 6 years ago

@Shinichi52 run-ios is not great as it seems to not show you the full errors or warnings. It also has no control over cache cleaning like XCode does. I'd stick with using XCode anyway, as you can't change any of the project settings required to deliver the app without it anyway!

D1no commented 6 years ago

Upgraded from 2.0.5 -> 2.1.1 works

What I did.

Clean the Repo to get rid of all the chaches (stage your changes first): git clean -fdx -e .vscode (exclude folders such as .vscode with the -e flag) Delete xCode Derived Data cache: rm -rf ~/Library/Developer/Xcode/DerivedData Update to 2.1.1: yarn upgrade-interactive (select react-native-firebase and hit enter) Install pods: cd ios && pod install && cd ..

Since we have different schemas, I run the app from xcode.

D1no commented 6 years ago

Thank you guys for the very quick turnaround. Impressive! FYI: We just joined as patrons (https://www.patreon.com/invertase/posts) to support you guys and the react-native-firebase project. Thanks! 🚀

Ehesp commented 6 years ago

Awesome :) Thanks for helping debug it too!

Aung-Myint-Thein commented 5 years ago

I have tried all the methods above and still I get the same error. However, I used manual installation method and followed @AndreiCalazans here and @loukandr .. here but after that I still get above error and it says "undefined symbols for architecture x86_64 react native" :( Anyone any suggestions?

Actually, I tried with pod method but it breaks all the other libraries :(

I am using the following:

"react-native": "^0.55.4", "react-native-firebase": "^4.3.7", Firebase iOS SDK - 5.3.0

I am only using DynamicLink and Messaging. Following is the trace:


Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_FIRAnalytics", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseAnalytics.o)
  "_OBJC_CLASS_$_FIRAnalyticsConfiguration", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseAnalytics.o)
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in AppDelegate.o
      objc-class-ref in libRNFirebase.a(RNFirebase.o)
      objc-class-ref in libRNFirebase.a(RNFirebaseUtil.o)
  "_OBJC_CLASS_$_FIRDynamicLinkAndroidParameters", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseLinks.o)
  "_OBJC_CLASS_$_FIRDynamicLinkComponents", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseLinks.o)
  "_OBJC_CLASS_$_FIRDynamicLinkComponentsOptions", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseLinks.o)
  "_OBJC_CLASS_$_FIRDynamicLinkGoogleAnalyticsParameters", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseLinks.o)
  "_OBJC_CLASS_$_FIRDynamicLinkIOSParameters", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseLinks.o)
  "_OBJC_CLASS_$_FIRDynamicLinkItunesConnectAnalyticsParameters", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseLinks.o)
  "_OBJC_CLASS_$_FIRDynamicLinkNavigationInfoParameters", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseLinks.o)
  "_OBJC_CLASS_$_FIRDynamicLinkSocialMetaTagParameters", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseLinks.o)
  "_OBJC_CLASS_$_FIRDynamicLinks", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseLinks.o)
  "_OBJC_CLASS_$_FIRInstanceID", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseInstanceId.o)
      objc-class-ref in libRNFirebase.a(RNFirebaseMessaging.o)
  "_OBJC_CLASS_$_FIRMessaging", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebaseMessaging.o)
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in libRNFirebase.a(RNFirebase.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)```
Aung-Myint-Thein commented 5 years ago

I set up using pod and it is working fine. So, maybe above comment is not valid anymore. Thanks guys! Followings are the steps I did in my project:

react-native unlink react-native-firebase react-native install --save react-native-firebase cd ios pod init pod update pod install (will get some warnings but the above link shows how to solve them. open xcworkspace file in xcode and solve them.) react-native link react-native-firebase open xcworkspace file in xcode. Build

vongohren commented 5 years ago

@Aung-Myint-Thein did it work with all other linked libraries from earlier? Or what happens to them?

krisnailafat commented 5 years ago

i have the same problem, but im not using cocoapods, is there any way without cocoapods ?

Aung-Myint-Thein commented 5 years ago

I tried without cocoapods way and it was much more complicated and I didnt get it. So, currently, my project is using cocoapods. It is much simpler and not much trouble.

On Wed, 2 Jan 2019 at 9:20 AM, krisna ilafat notifications@github.com wrote:

i have the same problem, but im not using cocoapods, is there any way without cocoapods ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/invertase/react-native-firebase/issues/321#issuecomment-450779075, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlYDtNdKBeg7LjOSMZ2znBq2icFuR2vks5u_B6NgaJpZM4Ox87- .

-- Sent from Gmail Mobile

vongohren commented 5 years ago

Im using Cocoa pods for just firebase, all the rest is like before.

MalcolmnDEV commented 5 years ago

I have the same issue

srizvi-official commented 5 years ago

any solution guys? im not using cocoa pod. updated project from 0.57 to 0.58 now. No success

Undefined symbols for architecture arm64: "_GULIsLoggableLevel", referenced from: _FIRIsLoggableLevel in FirebaseCore(FIRLogger.o) -[APMMonitor isLoggableLevel:] in GoogleAppMeasurement(APMMonitor_405c5a637e87914c89c37652996d219d.o) "_GULLogBasic", referenced from: _FIRLogBasic in FirebaseCore(FIRLogger.o) -[APMASLLogger logMessage:logTag:messageCode:withLogLevel:] in GoogleAppMeasurement(APMASLLogger_b06c35e24aea4d3ad666632e11e79ef6.o) "_GULLogError", referenced from: +[APMAnalytics startWithAppID:origin:options:] in GoogleAppMeasurement(APMAnalytics_f5f2b01aed09e7d23917a3e8a400242e.o) -[APMUserDefaults synchronize] in GoogleAppMeasurement(APMUserDefaults_cec267d1ff21df5a0ffda1a71af1431f.o) "_GULLogInfo", referenced from: ___44+[UIViewController(APMScreenClassName) load]_block_invoke in GoogleAppMeasurement(UIViewController+APMScreenClassName_bb34840e14481f32c5ecb9ffcac15bff.o) "_GULLogWarning", referenced from: +[APMMeasurement sharedInstance] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) -[APMUserDefaults objectForKey:] in GoogleAppMeasurement(APMUserDefaults_cec267d1ff21df5a0ffda1a71af1431f.o) -[APMUserDefaults setObject:forKey:] in GoogleAppMeasurement(APMUserDefaults_cec267d1ff21df5a0ffda1a71af1431f.o) -[APMUserDefaults synchronize] in GoogleAppMeasurement(APMUserDefaults_cec267d1ff21df5a0ffda1a71af1431f.o) ___44+[UIViewController(APMScreenClassName) load]_block_invoke in GoogleAppMeasurement(UIViewController+APMScreenClassName_bb34840e14481f32c5ecb9ffcac15bff.o) "_GULLoggerEnableSTDERR", referenced from: ___FIRLoggerInitializeASL_block_invoke in FirebaseCore(FIRLogger.o) "_GULLoggerForceDebug", referenced from: ___FIRLoggerInitializeASL_block_invoke in FirebaseCore(FIRLogger.o) "_GULLoggerInitializeASL", referenced from: ___FIRLoggerInitializeASL_block_invoke in FirebaseCore(FIRLogger.o) "_GULLoggerRegisterVersion", referenced from: ___FIRLoggerInitializeASL_block_invoke in FirebaseCore(FIRLogger.o) "_GULSetLoggerLevel", referenced from: _FIRSetLoggerLevel in FirebaseCore(FIRLogger.o) -[APMMonitor setDebugModeEnabled:] in GoogleAppMeasurement(APMMonitor_405c5a637e87914c89c37652996d219d.o) "_OBJC_CLASS_$_GULAppDelegateSwizzler", referenced from: objc-class-ref in GoogleAppMeasurement(APMAnalytics_f5f2b01aed09e7d23917a3e8a400242e.o) "_OBJC_CLASS_$_GULAppEnvironmentUtil", referenced from: objc-class-ref in FirebaseMessaging(FIRMessagingAnalytics.o) objc-class-ref in FirebaseMessaging(FIRMessagingReceiver.o) objc-class-ref in FirebaseAuth(FIRAuth.o) objc-class-ref in FirebaseAuth(FIRAuthAPNSTokenManager.o) objc-class-ref in FirebaseAuth(FIRAuthAppDelegateProxy.o) objc-class-ref in FirebaseAuth(FIRAuthDefaultUIDelegate.o) objc-class-ref in FirebaseCoreDiagnostics(FIRDiagnostics_afb9975b7573ce8caa0e4380e6bfbe31.o) ... "_OBJC_CLASS_$_GULMutableDictionary", referenced from: objc-class-ref in GoogleAppMeasurement(APMRemoteConfig_a87cea1e5d19294f87a4448795cd24c6.o) "_OBJC_CLASS_$_GULNetwork", referenced from: objc-class-ref in GoogleAppMeasurement(APMAnalytics_f5f2b01aed09e7d23917a3e8a400242e.o) objc-class-ref in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) objc-class-ref in GoogleAppMeasurement(APMAppDelegateInterceptor_d25c2dc381ddbd5008199366846aae05.o) objc-class-ref in FirebaseCoreDiagnostics(FIRClearcutLogger_45763904baa6658ff86b47cac2ab23e7.o) "_OBJC_CLASS_$_GULReachabilityChecker", referenced from: objc-class-ref in FirebaseMessaging(FIRMessaging.o) "_OBJC_CLASS_$_GULSwizzler", referenced from: objc-class-ref in GoogleAppMeasurement(UIViewController+APMScreenClassName_bb34840e14481f32c5ecb9ffcac15bff.o) "_OBJC_CLASS_$_GULUserDefaults", referenced from: objc-class-ref in FirebaseCoreDiagnostics(FIRDiagnostics_afb9975b7573ce8caa0e4380e6bfbe31.o) objc-class-ref in FirebaseInstanceID(FIRInstanceIDCheckinPreferences_36766016f801e2f19278d2e4a3dc9dc2.o) objc-class-ref in FirebaseInstanceID(FIRInstanceIDUtilities_6068b4cdd1114b87139202a3c6ae828a.o) "_kGULNetworkHTTPStatusCodeCannotAcceptTraffic", referenced from: -[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) "_kGULNetworkHTTPStatusCodeNotFound", referenced from: -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) "_kGULNetworkHTTPStatusCodeNotModified", referenced from: -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) "_kGULNetworkHTTPStatusCodeUnavailable", referenced from: -[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) "_kGULNetworkHTTPStatusNoContent", referenced from: -[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) "_kGULNetworkHTTPStatusOK", referenced from: -[APMMeasurement networkUploadCompletionHandlerWithResponse:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) -[APMMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in GoogleAppMeasurement(APMMeasurement_a76ff61c6b4ca85ef91462a646f323a0.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

ollyde commented 4 years ago

On React-native 60.4, followed everything here. Cannot build the project. (So typical of RN..)

ld: warning: directory not found for option '-L/Users/oo/Library/Developer/Xcode/DerivedData/righter-czofbqejhzpmveescwmgwextrvgb/Build/Products/Debug-iphonesimulator/yoga'
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCCManager", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mackenziemance commented 4 years ago

Also ran into this updating to 60.4, unsuppressed by previous solutions. @ollydixon did you find a fix?

Gaever commented 4 years ago

Same here. RN 0.60.4

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RNFirebaseMessaging", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_RNFirebaseNotifications", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Aung-Myint-Thein commented 4 years ago

I got this error again after updating to RN 0.60.4 last night. However, I fixed with all the steps I did as follows:

  1. I checked my rnfirebase version and it is not supported for RN 60.4. Most likely it is the case for you guys. So, I had to update it by just changing the version to 5.5.6 then npm i again.

  2. Then, I also need to update Podfile to use the latest libraries. I just follow https://rnfirebase.io/docs/v5.x.x/releases/v5.5.x#Upgrade-instructions and tried to run again.

  3. Then, it might not run successfully. Then

1) Do product > clean 2) Close Xcode 3) Re-run pod install (from the command line) 4) Re-open the .xcworkspace 5) Do product > clean 6) Try a build

(as mentioned in https://rnfirebase.io/docs/v5.x.x/troubleshooting/ios#Duplicate-Symbols-/-Undefined-Symbols-(build-time-error) )

Another note you guys have to be careful is that RN 0.60.x uses auto-linking and it can give a bit of problem if you don't "unlink" first before updating.

I also wrote a post with my updated Podfile content here. Hope some of them will be useful. Let me know how it goes. The process is really painful but once it is running, the RN 0.60.4 is quite good.

QuintonC commented 4 years ago

I tried following the comment above to resolve my issue, but I continue to receive the error outlined in the first comment.

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RNFirebaseMessaging", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_RNFirebaseNotifications", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The weirdest thing is that this is on a project that previously built (and is live on the app store). When I stash all of my changes and pull the repo from master to rebuild, the project fails with this error again.

I've followed the guide and updated everything, but to no avail. This is on an ExpoKit project as well.

IrwinBravoOporto commented 4 years ago

I am currently having conflicts to implement the GoogleAnalytics library, I already made it work, but I get this warning that GaiDicctionaryBuilder does not recognize. Neither is Google providing support, its library is out of date, so I had to create a module that can use its libraries. Undefined symbols for architecture x86_64: "_OBJCCLASS$_GAIDictionaryBuilder", referenced from: objc-class-ref in AppDelegate.o "_OBJCCLASS$_GAI", referenced from: objc-class-ref in AppDelegate.o "_kGAICampaignMedium", referenced from: ExampleSmart.AppDelegate.application(: C.UIApplication, didFinishLaunchingWithOptions: [C.UIApplicationLaunchOptionsKey : Any]?) -> Swift.Bool in AppDelegate.o "_kGAICampaignSource", referenced from: ExampleSmart.AppDelegate.application(: C.UIApplication, didFinishLaunchingWithOptions: [C.UIApplicationLaunchOptionsKey : Any]?) -> Swift.Bool in AppDelegate.o "_kGAIScreenName", referenced from: ExampleSmart.AppDelegate.application(: C.UIApplication, didFinishLaunchingWithOptions: [C.UIApplicationLaunchOptionsKey : Any]?) -> Swift.Bool in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

prasanna-col commented 2 years ago

Build target RNFBApp-framework

Link RNFBApp (x86_64)

Undefined symbols for architecture x86_64: "_OBJCCLASS$_FIROptions", referenced from: objc-class-ref in RCTConvert+FIROptions.o "_OBJCCLASS$_FIRApp", referenced from: objc-class-ref in RCTConvert+FIRApp.o objc-class-ref in RNFBAppModule.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

my package versions:

"react": "16.6.3", "react-native": "^0.58.0", "@react-native-firebase/analytics": "^7.6.10", "@react-native-firebase/app": "^8.4.7",

I tried all the above solutions! couldn't solve this issue.

mikehardy commented 2 years ago

@prasannavenkatesh-colan 👋

1- this issue was closed nearly 2 years ago, it is unlikely anything will apply still 2- react-native 0.58 is nearly 2 years old though! it is unlikely it will work at all now 3- we are on v14.y.y here, the versions you have are unlikely to work anywhere now

I suggest you update to current stable versions and retry. If I had a react-native project based on version 0.58 I would probably pull the javascript aside and just re-init the underlying project

Here's a demo showing a clean integration from start to finish from react-native init, as a guide: https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh

mikehardy commented 2 years ago

I prefer npx react-native-clean-project these days, it is a maintained set of all the magic cleaning / reinstall steps

nolife08021 commented 1 year ago

@prasanna-col hi, I am facing the same issue, do you found anyway to fix it?