React-native: [PushNotification] RCTPushNotificationManager.h not found

Created on 2 Nov 2015  路  15Comments  路  Source: facebook/react-native

I followed everything here (https://facebook.github.io/react-native/docs/pushnotificationios.html
) to use PushNotification on iOS, but when I try to build the app, I get the following error.

RCTPushNotificationManager.h file not found

I even added RCTPushNotification.xcodeproj to Libraries but it still get the same error.

Good first issue Help Wanted Locked

Most helpful comment

I just had this issue and was able to fix it with the above comments but there was a gotcha for me...
For adding the header search path, I needed to add
$(SRCROOT)/../node_modules/react-native/Libraries/PushNotificationIOS
instead of
$(SRCROOT)/node_modules/react-native/Libraries/PushNotificationIOS
for my project to work. (My project was just updated to 0.14.2 from 0.12.0)
Hope this helps

All 15 comments

just encountered this issue, thx.

i think https://facebook.github.io/react-native/docs/pushnotificationios.html
should include details about linking libraries

Yeah, definitely. Please update the docs. @jihopark can you please re-open this issue? /cc @yychun1217 @ide

@niftylettuce @jihopark - can you submit a pull request please?

@brentvatne I now get some weird archive error message... I can't submit a PR till I figure this out. I wish there were clear instructions for this.

Here's the error:
screen shot 2015-11-07 at 6 18 59 pm

It's not an archive for some reason

screen shot 2015-11-07 at 7 03 01 pm

https://medium.com/@DannyvanderJagt/how-to-use-push-notifications-in-react-native-41e8b14aadae

Fixed it, I went into the XCode project for RCTPushNotifications, rebuilt it there after linking headers, and then went and rebuilt my main project. https://github.com/facebook/react-native/issues/1613#issuecomment-154769032

I just had this issue and was able to fix it with the above comments but there was a gotcha for me...
For adding the header search path, I needed to add
$(SRCROOT)/../node_modules/react-native/Libraries/PushNotificationIOS
instead of
$(SRCROOT)/node_modules/react-native/Libraries/PushNotificationIOS
for my project to work. (My project was just updated to 0.14.2 from 0.12.0)
Hope this helps

Looks like RCTPushNotification.xcodeproj is excluded from the rest of the libraries when creating a new project? @ide @nicklockwood Is this intentional?

To get this to work on master I had to add the project files, binary under build phases, and $(SRCROOT)/../node_modules/react-native/Libraries to my projects header search path.

We can update the docs explaining this if the project has been intentionally left out.

Let's update the docs.

@christopherdro yes, it's intentional. Apple rejects apps for referencing certain APIs if they aren't used, and PushNotifications is one such API.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lazywei picture lazywei  路  3Comments

DreySkee picture DreySkee  路  3Comments

grabbou picture grabbou  路  3Comments

jlongster picture jlongster  路  3Comments

vikeri picture vikeri  路  3Comments