ios-events.md 672 Bytes
Newer Older
yogevbd's avatar
yogevbd committed
1 2 3 4 5 6
---
id: ios-events
title: iOS
sidebar_label: iOS specific
---

yogevbd's avatar
yogevbd committed
7 8
## registerPushKitRegistered()
Fired when the user registers for PushKit notifications. The handler will be invoked with an event holding the hex string representing the `pushKitToken`
yogevbd's avatar
yogevbd committed
9 10

```js
11
Notifications.ios.events().registerPushKitRegistered((event: RegisteredPushKit) => {
yogevbd's avatar
yogevbd committed
12 13
  console.log(event.pushKitToken);
});
yogevbd's avatar
yogevbd committed
14 15
```

yogevbd's avatar
yogevbd committed
16 17
## registerPushKitNotificationReceived()
Fired when a PushKit notification is received. The handler will be invoked with the notification object.
yogevbd's avatar
yogevbd committed
18 19

```js
20 21
Notifications.ios.events().registerPushKitNotificationReceived((payload: object) => {
  console.log(JSON.stringify(payload));
yogevbd's avatar
yogevbd committed
22
});
yogevbd's avatar
yogevbd committed
23 24
```