notifications.registerForPushNotifications()

Type Function
Library notifications.*
Return value none
Revision 2017.3060
Keywords notification, notifications
See also Local/Push Notifications
notifications.scheduleNotification()

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()

Examples

local notifications = require( "plugin.notifications" )

notifications.registerForPushNotifications()