I used [[GKTurnBasedEventHandler sharedTurnBasedEventHandler] setDelegate:self];, but I do not receive delegate calls. It worked at some point, and I can’t understand how much my life has changed.
The application is properly encrypted (the icon with the number of games where it is on my turn is displayed on the main screen of the device). In addition, use is GKTurnBasedMatch loadMatchesWithCompletionHandler:able to detect when a player is turning (or not). In fact, in any other possible way, GameCenter seems to work just fine. I can even send (and receive) calls, but again, the delegate methods are not called: none of the methods GKTurnBasedEventHandlerDelegateare called (including handleTurnEventForMatch:, handleInviteFromGameCenter:etc.)
It becomes even weirder: if I completely leave the application and it becomes my turn, I do not see the GameCenter notification. However, I DO placed the icon in my application! if I just open the GameCenter application, I also see that it is my turn. Thus, even OS level notifications are not accepted, despite the fact that the data is correctly updated on the server ...
I heard that maybe the GameCenter Sandbox is just unreliable with the delivery of notifications ... but I really can't risk it. I need to check my code!
Things I tried:
- Make sure I'm testing on real devices (no simulators). I tested 4 real devices, including iPhones + iPads and iOS6 + iOS7.
NSAssert([GKTurnBasedEventHandler sharedTurnBasedEventHandler].delegate == self 60 , , ( : handleTurnEventForMatch: didBecomeActive: )- , push-
- , iTunesConnect
version CFBundleShortVersionString info.plist (0.0.1) iTunesConnect GameCenter "" . CFBundleVersion , , . - #s 3.
1.0.0 1.0 0.1 .. NSLog, , . - , ,
developer.apple.com, XCode GameCenter Capabilities. (, , "", , Provisioning Profile ). - push-. ( ) , , , APN-.
- ... . , , . 10 , , ( , ).
: Sandbox
[[GKLocalPlayer localPlayer] registerListener:self] GKTurnBasedEventHandler. , . SDK, 7.0 ( 7+).