I am trying to use the react-native-notifications library but I am getting a file not found error when I try to import "RNNotifications.h".
I followed the "Linking Libraries Manually" guide on the React Native docs. Play by play, this is what I did:
Step 1:
I opened my project on Xcode, clicked my project's name, opened its "Libraries" folder, then used Finder to add "RNNotifications.xcodeproj" (a file located inside my project's node_modules/react-native-notifications/RNNotifications folder).
Step 2:
Made sure my project was selected, targeted my project's name, then added "libRNNotifications.a" in "Build Phases" under "Link Binary With Libraries".
Step 3: I went under "Build Settings" and added the following path to my "Header Search Paths":
$(SRCROOT)/../node_modules/react-native-notifications/RNNotifications
I did so with the "non-recursive" option because there are no sub-folders inside the RNNotifications folder.
Step 4:
I went inside my project's "AppDelegate.m" and added the following import statement:
#import "RNNotifications.h"
After these four steps, I get a "'RNNotifications.h' file not found" error.
On step 3 when you search for "Header Search Paths" make sure to select the target which is your projects name, you can do this by looking at the left tab, you should see the Project tab with the xcodeproj file under it and another Targets tab. just select your project under the Targets before searching for "Header Search Paths" then add the path there
$(SRCROOT)/../node_modules/react-native-notifications/RNNotifications
This image shows the TARGETS tab which you must select first

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With