endTurnWithNextParticipants is not triggering notifications.

I am serialising my game state and sending it off with endTurnWithNextParticipants.

The call returns with no errors.

And if I reload the app, the game state has indeed updated. The data is reaching GameCenter and being picked up by the next player.

So far, so good.


However I would expect.

a) an immediate push notication to appear if the game is not running

b) a player (receivedTurnEventForMatch to be called if the game is running.

Neither is happening.


I have checked...

ITC - to make sure the app is marked as GameCenter enabled.

ITC - checked the bundle name etc.

Added Push Notification entitlement in XCode (although not sure whether this is required)

Checked other game center turn apps (Letterpress) with the same IDs to make sure the IDs are valid.


Any suggestions?

Replies

Just wanted to add that I've filed a bug report for this issue (23339407), with examples of working and not working App Ids.

Cheers,


Me too. I have a presentation coming up, and my game prototype could look a bit smoother.

Same for me....

Might be worth filing a radar.

And word from Apple on this? I have been pulling my hair out for 4 days trying to get...

func player(player: GKPlayer, receivedTurnEventForMatch match: GKTurnBasedMatch, didBecomeActive: Bool) {
     NSLog("Player receivedTurnEventForMatch")
}

...to be called.


No matter what I do (and I have tried literally dozens of combinations and total rewrites), it just doesn't get called. If my app is not running I also never get a push notification of any kind.


But yet the match has advanced on the server and pulling down the new match indicates it is the new player's turn. This is all done on devices to rule out the simulator. Also done with two real GameCenter accounts and two Sandbox ones and combinations there of. Nothing makes any difference.


This is a brand new app I am writing from scratch, so the ITC entry is new as well as the provision and such. I keep finding things I've missed like not having GameCenter on in ITC at first thinking that turning it on will certainly fix my issue, but still nothing. Although maybe the problem is that I tried doing all this with it off first and now their server is left in a strange state of banning my app?


-*****

Nothing but the occasional tumbleweed rolling through frame.


My experience is identical. I had to give a presentation of the game, and faked it by having both clients constantly polling the server and spotting if the game state changes. This workaround is not particularly reliable or good.


My guess is that it is something going wrong at iTunes Connect.

If I could, I would destroy the iTunes Connect game identity and see if starting again made a difference. But that isn't actually very easy to do.

I have exactly the same experience as gselfish:

1. a bundle id created before the sand box game center environment was merged with the production environment get notifications in the non production mode

2. a bundle id created after the migration - no notification at all

3. due to 1. I could at least test the integration of notifications and went then live with a 2. (=bundle id, where notifications do not work). In the production GC system (= my app is in app store) notifications are working


I've opened a bug 23650539 on 23. November 2015, but no feedback until now.


For me it is a clear "wrong meta data of newly created bundle ids" problem.

This sounds right.

It is as if iTunes-Connect in the post-sandbox world, is somehow mis-labelling the bundle-id. And the upshot is no notifications.


I created a radar 23263651on the 26th October 2015

No feedback yet.

Thank you siarsky for the good news.

Se basically, if I understood correctly, your "new" bundle id has started working as expected after the app went live, despite it missing notifications during testing, right?

I'd still be a bit nervous at releasing an update without knowing for sure what to expect, but at least that gives me some hope. 🙂

Any news on this? I'm having the same problem.

When I look in "member center"/"Certificates, Identifiers & Profiles"

Push Notifications are marked as Configurable for my Development profile, but as Enabled for my Distribution profile.

Can that be the reason?

As I understand it, the notifications from Game Center are not conventional push notifications. It's a different mechanism.

I don't think games need to support Push Notification in order to work with Game Center.

Having the same issue. No notifications or app badges are displaying. This is true for both sandbox and non-sanbox modes. I created the App ID around mid December, and I noticed the iTunes Connect interface referenced by a lot of people ( when describing how to enable game center for the app ) and even the official Apple Game Center Development guide, is different from the interface I'm seeing. I'm not even seeing GKTurnBasedEventListener events except for when I load the app manaully from the GKTurnBasedMatchmakerViewController.

*UPDATE*

Just tried again today after reading a comment on stackoverflow yesterday saying everything was working now, and sure enough I got my push notifications. Maybe Apple has fixed the issue? Or maybe it just goes through fits and starts of working and not working...

Just tried out my app.


With a whole 5 seconds of testing, it appears to be working.


Looks like turn-based games are, once again, possible.