Hi,
I have a show stopping problem with push notifications on iOS. I developed a game (Playfab title ID 617E / not published yet) and implemented push notifications, which (after some confusion) finally worked well.
Now I found a publisher and before the release I just wanted to upload a new push certificate, because the app is now managed from the publishers Apple Developer Account, and needs certificates from this account. After uploading the new push certificate the push notifications don't work anymore. The Playfab.SendPushNotification function returns
"errorMessage": "iOS Push Notification Failed: Client has been unregistered for push notifications."
I think my case is similar to this forum post and @Brendan already answered there that push setup is just "remarkably fragile". And "once it's working in your testing, it should not need to be re-added". I hope this is not the last word, because in practice the certificates have to be re-added each year, since they expire.
So this is, what I already tried:
- re-generating the push certificate in the Apple Developer Dashboard und re-uploading it to Playfab according to the Playfab instruction.
- uploading to Playfab in different ways(via PlayfabDashboard>Settings>PushNotifications>UploadButton) (via Playfab.SetupPushNotification call while preparing the *.pem file with the Playfab provided browser formating tool) (via Playfab.SetupPushNotification call while preparing the *.pem content manually)
- doing all this after renaming my project
- doing all this after clicking PlayfabDashboard>Settings>Push Notifications>Remove
Then I read in the apple push notification docs that the "unregistered" phrase from my error response points to a wrong "topic" that means a wrong app bundle ID (which may be saved somewhere at Amazon SNS). That could indeed be, since with the transfer to the publishers account the app got a new bundle ID. So in an act of despair I generated a completely new Playfab project (ID 937E) and added all leaderboards and cloudscripts new from scratch, because I hoped that the new project is not contaminated somehow with the old projects bundle ID (and changed the Playfab Title ID in my Unity Project accordingly). Unfortunately the same error occured:
{ "code": 400, "status":"BadRequest", "error":"PushServiceError", "errorCode":1095, "errorMessage":"iOS Push Notification Failed: Client has been unregistered for push notifications.", "CallBackTimeMS":909 }
I would be very grateful for any help. @Brendan mentioned here that he can manually remove the SNS configuration for the title...but can this give hope, since it even didn't work with a completely new Playfab project?
If it helps I can provide the *.pem file.
For completeness of information:
The Playfab.SetupPushNotifications function returns
{ "code": 200, "status": "OK", "data": { "ARN":"arn:aws:sns:us-west-2:388128039633:app/APNS/sbbysygamb" }, "CallBackTimeMS":969 }
The push certificate is a distribution certificate and I use "Platform = APNS" and "OverwriteOldARN = true". The app has all push permissions activated on the test device. Client test device push registration to Playfab returns success.