0 Replies
      Latest reply on Nov 22, 2019 2:21 PM by animonger
      animonger Level 1 Level 1 (0 points)

        I am trying to add save game data functionality to my game app and I continue to get this error :

         

        Error Domain=GKErrorDomain Code=27 "The requested operation could not be completed because you are not signed in to iCloud or have not enabled iCloud Drive" UserInfo={NSLocalizedDescription=The requested operation could not be completed because you are not signed in to iCloud or have not enabled iCloud Drive}

         

        When I use the following code with the GKLocalPlayer Game Center authenticated:

        [[GKLocalPlayer localPlayer] saveGameData:gameData withName:dataName completionHandler:^(GKSavedGame *savedGame, NSError *error) {
          if(error) {
               NSLog(@"DEBUG:NSLog [SendCommands.mm] saveGameData error = %@", error);
          } else {
               NSLog(@"DEBUG:NSLog [SendCommands.mm] saveGameData success!");
               NSLog(@"DEBUG:NSLog [SendCommands.mm] saveGameData savedGame = %@", savedGame);
          }
        }];

        I'm testing on the following devices: OS X 10.11.6, iOS 12.4.2 and iOS 9.3.5.

        I've tried 3 different apple ID accounts, 2 test IDs and my Dev ID.

        All accounts were logged into game center and iCloud with the same account ID and iCloud Drive is turned on. iCloud Drive works through the OS UI as expected.

         

        The app is setup on App Store Connect but is not released yet. Working in sandbox.

        All other Game Center functionality (localPlayer authentication, leaderboards, achievements) is working and behaving as expected.

         

        Does GKSavedGame not work in sand box mode?