React-native-firebase: Undefined symbols for architecture x86_64

Created on 14 May 2018  路  5Comments  路  Source: invertase/react-native-firebase

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:

Most helpful comment

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.

All 5 comments

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

@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

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

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

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

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.

Was this page helpful?
0 / 5 - 0 ratings