I get the error:
Error Domain=GKErrorDomain Code=27 "The requested operation could not be completed because you are not signed in to iCloud" UserInfo=0x1889f160 {NSLocalizedDescription=The requested operation could not be completed because you are not signed in to iCloud}
when I'm trying to save game data using this obvious code:
[[GKLocalPlayer localPlayer] saveGameData:serializedData withName:@"SaveName" completionHandler:^(GKSavedGame *savedGame, NSError *error) {
if (savedGame != nil) {
NSLog(@"Player data saved to GameCenter: %@", savedGame);
} else {
NSLog(@"Player data NOT saved to GameCenter, error: %@", error.description);
}
}];
It's even more strange because it worked two weeks ago, so I commented it out and started coding other stuff: leaderboards, in-app purchase – and all these work.
I'm testing it on my iPhone (iOS 8.1.3) logged to Game Center, to iCloud, I've got iCloud Drive turned on, but saving doesn't work. I even set up a new test account, but with the same result.
Could testing all these functionalities on same test account make this problem or it's time to contact Apple?