Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Start () {
- IOSNotificationController.instance.RegisterForRemoteNotifications (UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound);
- IOSNotificationController.OnDeviceTokenReceived += OnDeviceTokenReceived;
- Debug.Log ("start loading screen");
- }
- void OnDeviceTokenReceived(IOSNotificationDeviceToken token) {
- Debug.Log ("OnTokenReceived");
- Debug.Log (token.tokenString);
- SFSObject obj = new SFSObject ();
- obj.PutUtfString ("tkn", token.tokenString);
- IOSNotificationController.OnDeviceTokenReceived -= OnDeviceTokenReceived;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement