Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aJIEw opened this issue Apr 3, 2020 · 0 comments

Comments

@aJIEw
Copy link

aJIEw commented Apr 3, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant