Files
react-native-notifications/docs/ios-events.md
2019-10-02 16:23:21 +03:00

672 B
Executable File

id, title, sidebar_label
id title sidebar_label
ios-events iOS iOS specific

registerPushKitRegistered()

Fired when the user registers for PushKit notifications. The handler will be invoked with an event holding the hex string representing the pushKitToken

Notifications.ios.events().registerPushKitRegistered((event: RegisteredPushKit) => {
  console.log(event.pushKitToken);
});

registerPushKitNotificationReceived()

Fired when a PushKit notification is received. The handler will be invoked with the notification object.

Notifications.ios.events().registerPushKitNotificationReceived((payload: object) => {
  console.log(JSON.stringify(payload));
});