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

Undefined symbols for architecture x86_64

Open ravivaishnav123 opened this issue 8 years ago • 5 comments

Help me this for this issue. I have implemented whole process according to process. when import this #import "RNFirebaseNotifications.h" I got a isuue.

Issue

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)

Environment

  1. Application Target Platform: ios os
  1. Development Operating System:ios
  1. Build Tools:xcode 9.3/9.2
  1. React Native version:53.3
  1. RNFirebase Version:4.1.0
  1. Firebase Module:

ravivaishnav123 avatar May 14 '18 11:05 ravivaishnav123

@ravivaishnav123 did you follow the instructions for setting up Messaging as well as Notifications?

chrisbianca avatar May 17 '18 16:05 chrisbianca

@chrisbianca I'm getting this same issue. I have followed the setup instructions for messaging and notifications in the links below.

https://rnfirebase.io/docs/v4.2.x/notifications/ios https://rnfirebase.io/docs/v4.2.x/messaging/ios

jnrepo avatar May 25 '18 01:05 jnrepo

Generally this happens when your XCode workspace is out of sync with the pod files.

Please follow the steps here to attempt to resolve your issues: https://rnfirebase.io/docs/v4.2.x/troubleshooting/ios#Duplicate-Symbols-/-Undefined-Symbols-(build-time-error)

If this does not fix the problem, please feel free to re-open

chrisbianca avatar May 29 '18 12:05 chrisbianca

Having slightly similar issue. @chrisbianca suggested solution did not help unfortunately.

screen shot 2018-08-22 at 2 46 20 pm

muhammadsr avatar Aug 22 '18 21:08 muhammadsr

If you've imported the RNFirebase.xcodeproj into your Libraries folder then you can click on it and make sure RNFirebase is selected under TARGETS, go to Build Settings and search for "other linker flags", double click the field and add -ObjC. I had similar issues with undefined symbols and this seemed to be the only thing that fixed it.

JMV2112 avatar Jan 24 '19 16:01 JMV2112