React-native-push-notification: Found Error in IOS "Native Module cannot be null"

Created on 4 Dec 2017  路  5Comments  路  Source: zo0r/react-native-push-notification

Hi
I am using it for local notification on my ios device. In Android device working fine but in ios giving me error of "Native module cannot be null"
simulator screen shot - ipad pro 9 7-inch - 2017-12-04 at 18 46 15

Most helpful comment

Fixed it by manual link. React-native link only able to link in android not for iOS you have to manually link this for ios.
Working fine for me after manual link

All 5 comments

This issue already exists: #501 #279

In you folder ios find the proyect .xcworkspace and delete. Build your .xcodeproj

Fixed it by manual link. React-native link only able to link in android not for iOS you have to manually link this for ios.
Working fine for me after manual link

Linking manually for iOS solved the issue for me as well. It's fairly easy, but the documentation has to explicitly mention this manual need, as the node-modules folder only has an Android folder and nothing for iOS and also when you run react-native link it confirms linking for Android only.

if it helps someone.
Manual link the library in
node_modules/react-native/libraries/PushNotificationIOS/RCTPushNotification.xcodeproj for ios
https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking

thats where the manual linking refers to. not react-native-push-notification

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GastonEDiaz picture GastonEDiaz  路  3Comments

NiuQiaoling picture NiuQiaoling  路  3Comments

ssolida picture ssolida  路  3Comments

cidevant picture cidevant  路  3Comments

halaharr picture halaharr  路  3Comments