Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Show the notification popup
- UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert |
- UnityEngine.iOS.NotificationType.Badge |
- UnityEngine.iOS.NotificationType.Sound);
- // Once the token is received, register endpoint
- m_mainClient.Notifications.RegisterEndpoint("ios-push-notifications", m_deviceToken, null, true, OnEndpointRegistered);
- // Later on we send a notification
- Notification notification = new Notification(targetUsername, "ios-push-notifications");
- notification.Set("alert", notificationMessage);
- notification.Set("sound", "default");
- Notification[] notifications = new Notification[1];
- notifications[0] = notification;
- m_mainClient.Notifications.Send(notifications, OnNotificationSent, OnNotificationFailed);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement