notifications.registerForPushNotifications()

Type Function
Return value none
Revision Release 2024.3703
Keywords notification, notifications, registerForPushNotifications
See also Local/Push Notifications (guide)
notifications.scheduleNotification()
notifications.*

Overview

Register for push notifications on iOS. This will show the popup which asks the user if they want to enable push notifications. After the first call, subsequent calls will not show the popup again.

Gotchas

This function does nothing on Android.

Syntax

notifications.registerForPushNotifications()

Example

local notifications = require( "plugin.notifications" )

notifications.registerForPushNotifications()