Version: 2017.2

NotificationServices

class in UnityEngine.iOS

切换到手册

描述

NotificationServices 仅适用于 iPhone/iPad/iPod Touch。

用于安排、注册和处理通知。

静态变量

deviceToken调用 NotificationServices.RegisterForRemoteNotificationTypes 后,从 Apple Push Service 收到的设备令牌。(只读)
enabledNotificationTypes启用的本地通知和远程通知的类型。
localNotificationCount收到的本地通知数。(只读)
localNotifications一个对象(表示收到的本地通知)列表。(只读)
registrationError返回通过 NotificationServices.RegisterForRemoteNotificationTypes 注册远程通知时可能发生的错误。(只读)
remoteNotificationCount收到的远程通知数。(只读)
remoteNotifications一个对象(表示收到的远程通知)列表。(只读)
scheduledLocalNotifications所有当前安排的本地通知。

静态函数

CancelAllLocalNotifications取消发送所有已安排的本地通知。
CancelLocalNotification取消发送指定的预定本地通知。
ClearLocalNotifications丢弃所有收到的本地通知。
ClearRemoteNotifications丢弃所有收到的远程通知。
GetLocalNotification返回表示特定本地通知的对象。(只读)
GetRemoteNotification返回表示特定远程通知的对象。(只读)
PresentLocalNotificationNow立即提供本地通知。
RegisterForNotifications注册以通过 Apple Push Service 从提供程序接收指定类型的本地和远程通知。
ScheduleLocalNotification安排本地通知。
UnregisterForRemoteNotifications取消注册远程通知。