Solvedreact native onesignal Unable to find libRCTOneSignal.a

I've followed the instructions for React Native SDK from here -

I've added the npm package, performed react-native link and also pod install. Everything went smooth.

Then I proceed to create the Notification Extension. When I get to the part where I'm instructed to add libRCTOneSignal.a in the Link Binary with Libararies setting, I'm not able to find it in the list that Xcode shows. Here's all I see when I search for One Signal:

screen shot 2018-08-16 at 12 55 02 pm

Here is my header search pages setting:
screen shot 2018-08-16 at 12 55 26 pm

Now I tried adding the libreact-native-onesignal.a, but when building I get this linking error:

ld: library not found for -lreact-native-onesignal
clang: error: linker command failed with exit code 1 (use -v to see invocation)


  1. react-native-one-signal - 3.2.6
  2. RN - 0.55.4
  3. Xcode - 9.2
27 Answers

✔️Accepted Answer

Turns out react-native link did not work correctly as usual :D I just had to manually add the RCTOneSignal project into Libraries and then I was able to add libRCTOneSignal.a

I think it would be nice if you guys can add the instructions for manually linking in addition to react-native link so people can verify if link worked correctly :)

Other Answers:

Open node_modules/react-native-onesignal/ios then drag and drop RCTOneSignal.xcodeproj to XCode project folder Libraries, then the libRCTOneSignal.a will appear on the search.

screenshot at nov 30 16-21-30

It sounds like this is an issue for those of you who are using Xcode 12 and are not using Cocoapods.

Reopening to track this issue.

@rgomezp is anyone looking into this?

Our project uses react-native 0.59 (no cocoapods) and it's not building on XCode 12 because of the issue here

More Issues: