Hi
The code example for getting token and registering iOS push notification in here
is obsolete. Can you provide the code for the newest mobile notification?
Specifically this part
UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound, true);
byte[] token = UnityEngine.iOS.NotificationServices.deviceToken;
if(token != null) { RegisterForIOSPushNotificationRequest request = new RegisterForIOSPushNotificationRequest(); request.DeviceToken = System.BitConverter.ToString(token).Replace("-", "").ToLower(); PlayFabClientAPI.RegisterForIOSPushNotification(request, (RegisterForIOSPushNotificationResult result) => { Debug.Log("Push Registration Successful"); }, OnPlayFabError); } else { Debug.Log("Push Token was null!"); }
After researching, we found the code provided by our PlayFab Unity SDK can work fine, but the following push notification service provided by Unity natively is obsolete, is it right?
UnityEngine.iOS.NotificationServices
If so, could you please also clarify which one Unity version you are using?
Tournaments question 1 Answer
no way to opt out of notifications?,No way to opt out of the emails? 2 Answers
Can send the push notification only while the game is open 1 Answer
New Apple root certificate for push notifications 1 Answer
Recieving push notifications when game is force closed 3 Answers