4

I am developing an app for iPad and iPhone with the Game Center Feature. The game is sending correctly one participant turns from iPad 2 IOS 6, but when I try to send the turn to another participant from an iPhone 4 IOS 5 the following error appears:

<GKTurnBasedParticipant 3d8e50 - id:(null) status:Matching outcome:None lastTurn:(null)>
2013-03-14 23:56:22.030 [453:707] ERROR::::::Error Domain=GKErrorDomain Code=3 "The requested operation could not be completed due to an error communicating with the server." UserInfo=0x7a81170 {NSUnderlyingError=0x3f4220 "The operation couldn’t be completed. status = 5008, missing required key: turns", NSLocalizedDescription=The requested operation could not be completed due to an error communicating with the server.}
2013-03-14 23:56:22.031 [453:707] Oops, there was a problem.  Try that again.

I am using the following method that works perfectly on IOS 6:

[currentMatch endTurnWithNextParticipant:nextParticipant
                                       matchData:data completionHandler:^(NSError *error) {
                                           if (error) {
                                               NSLog(@"%@", error);
                                               NSLog(
                                               @"Oops, there was a problem.  Try that again.");
                                           } else {
                                               NSLog(@"Your turn is over.");

                                           }
                                       }];

The error number 3 is GKErrorCommunicationsFailure,but I cant understand what it is going on!

I logged on correctly when the app starts with the Game Center

Aitul
  • 2,982
  • 2
  • 24
  • 52
  • 2
    Are you able to access the game center app? I've had problems loading the regular game center app as well as others. I've had to restore factory settings then re-jb it. – Evan Anger Mar 12 '13 at 22:19
  • YES, I am able to access to the game center app. I am also able to receive turns from other players, but I can not sent turns – Aitul Mar 12 '13 at 22:33
  • This problem has disappeared, and was ultimately a server issue. – Saltymule Mar 23 '13 at 01:21

1 Answers1

0

This error will always come when you are working on Simulator instead of device, but sometimes it pops out on device, because of Push Notification Failure, Please check if you device is receiving Push Notifications.

UPDATED

I recently figured it out that Game Center does not send push notifications to devices which does not have sim card inserted

Community
  • 1
  • 1
Adeel Pervaiz
  • 1,336
  • 10
  • 11
  • This message appears when I am working with iphone 4 with IOS 5.0.1. My device is not receiving push notifications for game center because it is impossibe to continue a game without sending turn to another player – Aitul Mar 15 '13 at 08:12
  • 1
    Please check if you device is generally receiving PUSH notifications, sometimes JAIL BROKEN device malfunction not to receive PUSH notifications. – Adeel Pervaiz Mar 15 '13 at 08:16
  • My device recives push notifications correctly. My phone was jailbroken, and I deleted the jailbroken and restarted it in case the phone was banned, but it still not working in Game Center send turn only with the game that I am developing – Aitul Mar 15 '13 at 09:13
  • 1
    @Aitul have you solved the issues? if not, check if the Sim card is inserted in your iPhone, I recently figured it out that Game Center does not send push notifications to devices which does not have sim card inserted. – Adeel Pervaiz Mar 28 '13 at 20:22