private static List <Dictionary <string, object> > GetRemoteNotifications()
        {
            List <Dictionary <string, object> > result = new List <Dictionary <string, object> >();

            if (UnityEngine.iOS.NotificationServices.remoteNotificationCount > 0)
            {
                for (int r = 0; r < UnityEngine.iOS.NotificationServices.remoteNotificationCount; r++)
                {
                    UnityEngine.iOS.RemoteNotification remoteNotification = UnityEngine.iOS.NotificationServices.GetRemoteNotification(r);
                    result.Add(new Dictionary <string, object>()
                    {
                        { "message", remoteNotification.alertBody },
                        { "payload", remoteNotification.userInfo }
                    });
                }
                UnityEngine.iOS.NotificationServices.ClearRemoteNotifications();
                if (GamedoniaPushNotifications.notificationType == UnityEngine.iOS.NotificationType.Badge)
                {
                    ClearBadge();
                }
            }

            return(result);
        }
示例#2
0
 public void PushNotification(UnityEngine.iOS.RemoteNotification notification)