Search code examples
xcodereact-nativeapple-push-notificationsnode-modulesreact-native-push-notification

Can't find RCTPushNotification.xcodeproj


I'd like to use the file RCTPushNotification.xcodeproj inside the directory node_modules/react-native/Libraries/PushNotificationIOS, to add it in my Libraries folder in order to manage iOS push notifications. I'm following this tutorial: https://www.pubnub.com/blog/react-native-push-notifications-ios-android/.

The problem is that I can't find it, even after deleting node_modules and executing npm install && react-native link.

Here is my package.json dependencies, but I don't think that a package could modify my directory:

{
  "dependencies": {
    "@dudigital/react-native-zoomable-view": "^1.0.14",
    "firebase": "^6.5.0",
    "pubnub": "^4.27.0",
    "pubnub-react": "^1.3.2",
    "react": "16.9.0",
    "react-native": "0.61.5",
    "react-native-cli": "^2.0.1",
    "react-native-fast-image": "^7.0.2",
    "react-native-fs": "^2.16.2",
    "react-native-gesture-handler": "^1.5.0",
    "react-native-image-picker": "^0.28.0",
    "react-native-optimized-flatlist": "^1.0.4",
    "react-native-push-notification": "^3.1.9",
    "react-native-view-shot": "^3.0.2",
    "react-navigation": "^3.13.0",
    "react-redux": "^7.1.3",
    "redux": "^4.0.4",
    "rn-fetch-blob": "^0.11.2"
  }

Here are the only files I can see on this directory:

  • NativePushNotificationManager.js
  • RCTPushNotificationManager.h
  • RCTPushNotificationManager.m
  • React-RCTPushNotification.podspec

Knowing that RCTPushNotificationManager.m and RCTPushNotificationManager.h should be inside my xCode project, I tried to put the entire PushNotificationIOS folder in my Libraries folder, but it doesn't seems to work because there is not the necessary Products folder inside of an xCode project.

I also tried to put each of this files in my Libraries folder, but Xcode doesn't consider them as xCode projects (not very surprising).

This issue doesn't seem to have been encountered earlier.


Solution

  • After just spending a lot of time and effort on push notifications, I recommend you look into OneSignal push notifications. Saved me a lot of time. However, you should be able to find the .xcodeproj here: https://github.com/react-native-community/react-native-push-notification-ios/tree/master/ios