title: Error Domain=GKErrorDomain Code=17 "The requested operations could not be completed because one or more parameters are invalid."
body: <p>In my iOS game I try to upload the saved game of my player into the iCloud to sync the process between all Apple devices like so:</p>
  
  <pre><code>[[GKLocalPlayer localPlayer] saveGameData:[[mySerializedData dataUsingEncoding:kCFStringEncodingUTF16BE] withName:@"main" completionHandler:^(GKSavedGame * _Nullable savedGame __unused, NSError * _Nullable error) {
      if(error == nil)
      {
          ret = true;
      }
      else
      {
          ret = false;
          NSLog(@"Failed to upload saved game data: %@", error.description);
      }
  }];
  </code></pre>
  
  <p>However, it logs: </p>
  
  <blockquote>
    <p>Failed to upload saved game data: Error Domain=GKErrorDomain Code=17 "The requested operations could not be completed because one or more parameters are invalid." UserInfo={NSLocalizedDescription=The requested operations could not be completed because one or more parameters are invalid.}</p>
  </blockquote>
  
  <p>If I understand correctly, it will use the iCloud-Container to store the saved game, so I made sure this is set up, properly:</p>
  
  <p><a href="https://i.stack.imgur.com/xYESM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xYESM.png" alt="Illustrating the iCloud settings of the project"></a></p>
  
  <p>I can already log into the Game-Center on game start, I can also upload scores to my leaderboard as well as opening the leaderboard, so the user should be authorised. </p>
  
  <p>How can I upload the saved game to the iCloud?</p>