react-native-fcm: build error "_OBJC_CLASS_$_RNFIRMessaging"

Hi,

I’m using react-native 0.48.2 and the last know sdk version.

I’m not using cocoapods for the project (kinda lost with it), I did every steps explained in the FCM README

  • drag and drop each .framework
  • add to target
  • make sure that a specific checkbox is checked

Then I modified every needed file (AppDelegate.m | h)

And now whenever I try to build I got this this

  "_OBJC_CLASS_$_RNFIRMessaging", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_SKPaymentQueue", referenced from:
      objc-class-ref in FirebaseAnalytics(FIRAInAppPurchaseTransactionReporter_51b6624ff1330bf43a3ed7d9ba76e1ba.o)
  "_OBJC_CLASS_$_SKProductsRequest", referenced from:
      objc-class-ref in FirebaseAnalytics(FIRAProductsRequest_b9979194c8f29313114f911734ebc0e8.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 really am inexperienced with XCODE and IOS development so I'm sorry if I didn't fill this issue right, I will try my best to correct it with your advice

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 20 (7 by maintainers)

Most upvoted comments

For your information, I solved this (after 3-4 hours…) by adding

#import "Firebase.h"

just before

#import "RNFIRMessaging.h"

OMG, @evollu Thank you so much for your work and your reactivity !!!

I just fixed my problem by simply drag and dropping the RNFireMessaing.xcodeproject into the libraries of mine and linking it, I didn’t do react-native link in the first place so that’s on me 🤦‍♂️

@evollu libRNFIRMessaging.a is not linking through react-native link. How to link it manually?

@vendramini libRNFIRMessaging.a is the right name.

I don’t know why pod downgraded but it shouldn’t be caused by with this repo.

I wonder if you install this repo through pod. Usually it is linked though Library (or react-native link)

I’ve just created the podfile and pod install. Supposedly, this should be added automatically, didn’t it?

If I try to add manually, libRNFCM.a doesn’t appear on the list to choose.

I’m completely new on iOS world, I’m a JS/PHP/Java developer.