iOS setup issues. Should revisit iOS documentation
See original GitHub issueRight now the documentation for the iOS setup prompts to follow these instructions. https://facebook.github.io/react-native/docs/pushnotificationios.html#content
However this is both deprecated in RN core and doesnt work with the new autolinker system. Documentation should be revised to point here. https://github.com/react-native-community/react-native-push-notification-ios
A thing to note about react-native-community/react-native-push-notification-ios (at least at this point) is simply npm install
doesnt work at this moment as there is an issue where you need to reference the podspec explicitly in your Podfile.
https://github.com/react-native-community/react-native-push-notification-ios/issues/11
Hope this helps someone, took multiple hours and the help of a friend to figure out.
EDIT: Going with the react-native-community version is not an approach that will work as it yields
Native module cannot be null most likely due to an import incompatibility.
Its a little confusing on how to make this work with ^0.60
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:10
Top GitHub Comments
HI @GertjanReynaert - thanks for sharing. I can also confirm that the latest build works fine react-native-push-notification (3.1.8) and @react-native-community/push-notifications-ios (1.0.2.
The install instructions look like they have been updated, but for anyone coming from a previous release where they were using React-RCTPushNotification here are the steps:
Firstly, React-RCTPushNotification has been removed from the normal react package (just like ASyncStorage was) and now resides within the community. Therefore you will need to:
pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
yarn add @react-native-community/push-notifications-ios
pod install
#import <React/RCTPushNotificationManager.h>
and replace with#import <RNCPushNotificationIOS.h>
This one caught me off guard so I hope this helps someone!
With the latest version of
react-native-push-notification
(3.1.8) and@react-native-community/push-notifications-ios
(1.0.2) I was able to get things working in RN60 by just doing the npm install and using the auto loading of RN60