Type Function Return value none Revision Release 2024.3703 Keywords notification, notifications, registerForPushNotifications See also notifications.*
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.
This function does nothing on Android.
notifications.registerForPushNotifications( [params] )
Table. Optional table containing registration parameters — see the next section for details.
The params
table includes additional parameters for notification registration.
local notifications = require( "plugin.notifications.v2" ) notifications.registerForPushNotifications()
local notifications = require( "plugin.notifications.v2" ) notifications.registerForPushNotifications( { useFCM=true } )