question

Anh Le avatar image
Anh Le asked

Can send the push notification only while the game is open

If I send the direct push notification (on Player profile page) while the game is minimized, it shows:

Failed to deliver to mobile device. Check that the device is registered for push notifications. Error: iOS Push Notification Failed: Client has been unregistered for push notifications..

I had to close the game, open it and then sent the push. Then I could send it successfully. However, the client didn't receive the push.

Thasnk,
Anh

Player DataPush Notificationsgame manager
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Andy avatar image
Andy answered

Yes, your game should be able to receive push notifications while it is open or closed, though it may depend on what the user has allowed for the application in the OS settings. As to getting registration straight, ensure you've worked through both our push notification basics and the iOS guide.

9 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anh Le avatar image Anh Le commented ·

Hi. I don't get it. Why can all others game receive the notification when the user doesn't open the game?

0 Likes 0 ·
Andy avatar image Andy ♦♦ Anh Le commented ·

Sorry, I misread your question. A user of your game should be able to receive push notifications in either case, open or closed, so long as the user has the appropriate OS settings and you've worked through the registration flow with our servers.

0 Likes 0 ·
Techadmin avatar image Techadmin commented ·

I am having the same weird behavior.

All the set up seams right. But, I am only able to send push notifications to the device as long as the game is open (they don't show up on the device though, but I think that is normal iOS behavior).

As soon as I exit the app, if I send the notification I get the next message:
"Failed to deliver to mobile device. Check that the device is registered for push notifications. Error: iOS Push Notification Failed: Client has been unregistered for push notifications."

Any idea of what is going on?

@brendan @Andy

0 Likes 0 ·
brendan avatar image brendan Techadmin commented ·

This sounds identical to this thread: https://community.playfab.com/questions/16890/ios-push-doesnt-work-anymore-after-uploading-new-p.html

Can you a) check that this isn't an APNS vs APNS_SANDBOX issue, and if that checks out, try walking through the setup process from scratch?

0 Likes 0 ·
Techadmin avatar image Techadmin brendan commented ·

I am using the production one. Shouldn't that work on both environments?

Will try again though and post back.

Thank you

0 Likes 0 ·
Show more comments
Techadmin avatar image Techadmin commented ·

Nice, it works with developent one. Now, the questions is, once we update the game at the store, we need to chance the APN to production?

0 Likes 0 ·
brendan avatar image brendan Techadmin commented ·

The Title ID must be configured with the correct Push Notification environment you need. What I'd recommend is that you use a separate Title ID for Sandbox testing.

0 Likes 0 ·
Techadmin avatar image Techadmin brendan commented ·

Thank you. Android and iOS set up already.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.