title: Problems With Game Center
body: <p>Just finished my first iOS game (mostly). Its all ready to go, just need to link in Game Center. This however, is proving to be ...annoying. My App is all registered on iTunes Connect, and all the Game Center code is taken directly from Apple. So why is NONE of this working? </p>
  
  <p>First: authentication always fails;</p>
  
  <pre><code> GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
  
   localPlayer.authenticateHandler = ^(UIViewController *loginVC, NSError *error) {
      if ([GKLocalPlayer localPlayer].authenticated) {
          // authentication successful   
      }
      else if (loginVC) {
          // player not logged in yet, present the vc
          [self presentViewController:loginVC animated:YES completion:nil];
      }
      else {
          // authentication failed
      }
  };
  </code></pre>
  
  <p>With error "The requested operation has been cancelled"</p>
  
  <p>As a corollary, trying to present a game center vc in the future yeilds a "Player is not signed in message"</p>
  
  <p>Second: this </p>
  
  <pre><code>GKScore *score = [[GKScore alloc] init];
  if (score) {
      score.value = self-&gt;selectedScore;
      NSArray* scoreArray = [[NSArray alloc]initWithObjects:score, nil];
      //score.category = @"High Scores";
  
      UIActivityViewController *avc = [[UIActivityViewController alloc]
                                       initWithActivityItems:scoreArray applicationActivities:nil];
      avc.completionHandler = ^(NSString *activityType, BOOL completed) {
          if (completed)
              [self dismissViewControllerAnimated:YES completion:nil];
      };
  
      if (avc)
          [self presentViewController:avc animated:YES completion:nil];
  }
  </code></pre>
  
  <p>yeilds a <code>'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'</code></p>
  
  <p>What am I fundamentally doing wrong? Thanks to anyone who can offer any help.</p>