类型 字符串 事件 通知 修订 版本 2024.3703 关键词 通知,类型
一个字符串,用于标识通知事件的类型
"local"
— 来自本地创建的事件。"remote"
— 来自服务器的远程推送事件。"remoteRegistration"
— 用于初始化远程推送事件。如果成功,该事件还将包含一个 "token"
属性,其中包含您的推送服务器与 Apple 的推送通知服务器通信所需的字符串;如果没有,则该事件将具有一个 "error"
属性。-- The launch arguments provide a notification event if this app was started when the user tapped on a notification local launchArgs = ... if ( launchArgs and launchArgs.notification ) then print( launchArgs.notification.type ) print( launchArgs.notification.name ) print( launchArgs.notification.sound ) print( launchArgs.notification.alert ) print( launchArgs.notification.badge ) print( launchArgs.notification.applicationState ) end