diff --git a/example/index.js b/example/index.js index 7fe95a72d..3d097fbbf 100644 --- a/example/index.js +++ b/example/index.js @@ -54,7 +54,9 @@ class NotificationsExampleApp extends Component { } requestPermissionsIos(options) { - Notifications.ios.registerRemoteNotifications(options); + Notifications.ios.registerRemoteNotifications( + Object.fromEntries(options.map(opt => [opt, true])) + ); } requestPermissions() { @@ -146,6 +148,12 @@ class NotificationsExampleApp extends Component { ); } + checkPermissions() { + Notifications.ios.checkPermissions().then((currentPermissions) => { + console.warn(currentPermissions); + }); + } + render() { const notifications = this.state.notifications.map((notification, idx) => ( @@ -163,9 +171,10 @@ class NotificationsExampleApp extends Component {