react-native-push-notification iOS:获取令牌

时间:2019-05-14 14:21:46

标签: android react-native react-native-push-notification

我在我的本机应用程序中使用react-native-push-notification进行推送通知。对于Android,一切正常,但无法获取iOS的设备令牌。可能是什么问题?

PushNotification.configure({
  onRegister(token) {
    console.log('TOKEN:', token);
  },
  onNotification(notification) {
    console.log('NOTIFICATION:', notification);
    notification.finish(PushNotificationIOS.FetchResult.NoData);
  },

  // ANDROID ONLY: GCM or FCM Sender ID (product_number) (optional - not required for local notifications, but is need to receive remote push notifications)
  senderID: '44290842894',

0 个答案:

没有答案