react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[PushNotification] RCTPushNotificationManager.h not found

Open jihopark opened this issue 11 years ago • 15 comments

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.

jihopark avatar Nov 02 '15 06:11 jihopark

fixed by following https://facebook.github.io/react-native/docs/linking-libraries-ios.html

jihopark avatar Nov 02 '15 06:11 jihopark

just encountered this issue, thx.

yychun1217 avatar Nov 02 '15 06:11 yychun1217

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

jihopark avatar Nov 02 '15 06:11 jihopark

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

niftylettuce avatar Nov 07 '15 23:11 niftylettuce

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

brentvatne avatar Nov 07 '15 23:11 brentvatne

@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.

niftylettuce avatar Nov 07 '15 23:11 niftylettuce

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

It's not an archive for some reason

niftylettuce avatar Nov 07 '15 23:11 niftylettuce

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

niftylettuce avatar Nov 08 '15 00:11 niftylettuce

https://github.com/facebook/react-native/pull/1979#issue-94795697

niftylettuce avatar Nov 08 '15 01:11 niftylettuce

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

niftylettuce avatar Nov 08 '15 01:11 niftylettuce

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

niftylettuce avatar Nov 08 '15 01:11 niftylettuce

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

krxsky avatar Nov 18 '15 09:11 krxsky

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.

christopherdro avatar Dec 16 '15 06:12 christopherdro

Let's update the docs.

ide avatar Dec 17 '15 01:12 ide

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

nicklockwood avatar Dec 30 '15 11:12 nicklockwood