ios-events.md 660 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
yogevbd's avatar
yogevbd committed
11 12 13
Notifications.events().registerPushKitRegistered((event: RegisteredPushKit) => {
  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
yogevbd's avatar
yogevbd committed
20 21 22
Notifications.events().registerPushKitNotificationReceived((event: object) => {
  console.log(JSON.stringify(event));
});
yogevbd's avatar
yogevbd committed
23 24
```