I have set up a device token with "PlayFabClientAPI.RegisterForIOSPushNotification()" when setting up push notifications for iOS. Is there any way to cancel the registered device token? Also, can I see device token information on Playfab? When "registerForRemoteNotifications = false" in AuthorizationRequest setting, I got "Push Registration Successful" but the device token was not removed.
public async void RegisterForIOSPushNotification()
{
AuthorizationOption authorizationOption;
bool registerForRemoteNotifications;
if (registerForRemoteNotificationsFlg == true)
{
authorizationOption = AuthorizationOption.Alert | AuthorizationOption.Badge | AuthorizationOption.Sound;
registerForRemoteNotifications = true;
}
else
{
authorizationOption = 0;
registerForRemoteNotifications = false;
}
using (var req = new AuthorizationRequest(authorizationOption, registerForRemoteNotifications ))
{
await UniTask.WaitUntil(() => !req.IsFinished);
if (req.Error != null)
{
Debug.LogError("req.ERROR:" + req.Error.ToString());
}
await UniTask.WaitUntil(() => req.DeviceToken != null);
if (req.DeviceToken != null)
{
var request = new RegisterForIOSPushNotificationRequest
{
DeviceToken = req.DeviceToken
};
PlayFabClientAPI.RegisterForIOSPushNotification(request,
result =>
{
Debug.Log("Push Registration Successful");
},
error =>
{
Debug.Log(error.GenerateErrorReport());
});
}
else
{
Debug.Log("Push Token was null!");
}
}
}