Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void Start () {
  2.         IOSNotificationController.instance.RegisterForRemoteNotifications (UnityEngine.iOS.NotificationType.Alert |  UnityEngine.iOS.NotificationType.Badge |  UnityEngine.iOS.NotificationType.Sound);
  3.         IOSNotificationController.OnDeviceTokenReceived += OnDeviceTokenReceived;
  4.         Debug.Log ("start loading screen");
  5. }
  6.  
  7.  
  8. void OnDeviceTokenReceived(IOSNotificationDeviceToken token) {
  9.         Debug.Log ("OnTokenReceived");
  10.         Debug.Log (token.tokenString);
  11.  
  12.         IOSNotificationController.OnDeviceTokenReceived -= OnDeviceTokenReceived;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement