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

由 push-notification-ios 造成的 "Invariant Violation: Native module cannot be null" 问题

Open aJIEw opened this issue 4 years ago • 0 comments

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

aJIEw avatar Apr 03 '20 05:04 aJIEw