react-native-mipush
react-native-mipush copied to clipboard
由 push-notification-ios 造成的 "Invariant Violation: Native module cannot be null" 问题
push-notification-ios 已经从 [email protected] 中移动到 @react-native-community/push-notification-ios 中了,所以需要对 index.js
作如下修改:
import {
NativeModules,
Platform,
- PushNotificationIOS,
NativeEventEmitter,
PermissionsAndroid,
} from 'react-native';
+import PushNotificationIOS from "@react-native-community/push-notification-ios";
参考 Migrating from the core react-native module @a289459798 @zhangzy2345