类型 函数 返回值 无 修订 版本 2024.3703 关键词 notification, notifications, registerForPushNotifications 另请参阅 本地/推送通知 (指南) notifications.scheduleNotification() notifications.*
在 iOS 上注册推送通知。这将显示一个弹出窗口,询问用户是否要启用推送通知。第一次调用后,后续调用将不再显示该弹出窗口。
此函数在 Android 上无效。
notifications.registerForPushNotifications()
local notifications = require( "plugin.notifications" ) notifications.registerForPushNotifications()