title: Can not register token with GCM
body: <p>I copy some google example for GCM(<a href="https://github.com/googlesamples/google-services/blob/master/ios/gcm/GcmExample/" rel="nofollow noreferrer">https://github.com/googlesamples/google-services/blob/master/ios/gcm/GcmExample/</a>)<br/></p>
  
  <pre><code>// [START_EXCLUDE]
  _registrationKey = @"onRegistrationCompleted";
  _messageKey = @"onMessageReceived";
  // Configure the Google context: parses the GoogleService-Info.plist, and initializes
  // the services that have entries in the file
  NSError* configureError;
  [[GGLContext sharedInstance] configureWithError:&amp;configureError];
  NSAssert(!configureError, @"Error configuring Google services: %@", configureError);
  _gcmSenderID = [[[GGLContext sharedInstance] configuration] gcmSenderID];
  // Register for remote notifications
  UIUserNotificationType allNotificationTypes =
  (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
  UIUserNotificationSettings *settings =
  [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];
  [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
  [[UIApplication sharedApplication] registerForRemoteNotifications];
  // [END register_for_remote_notifications]
  // [START start_gcm_service]
  GCMConfig *gcmConfig = [GCMConfig defaultConfig];
  gcmConfig.receiverDelegate = self;
  [[GCMService sharedInstance] startWithConfig:gcmConfig];
  // [END start_gcm_service]
  __weak typeof(self) weakSelf = self;
  // Handler for registration token request
  _registrationHandler = ^(NSString *registrationToken, NSError *error){
      if (registrationToken != nil) {
          weakSelf.registrationToken = registrationToken;
          NSLog(@"Registration Token: %@", registrationToken);
          [weakSelf subscribeToTopic];
          NSDictionary *userInfo = @{@"registrationToken":registrationToken};
          [[NSNotificationCenter defaultCenter] postNotificationName:weakSelf.registrationKey
                                                              object:nil
                                                            userInfo:userInfo];
      } else {
          NSLog(@"Registration to GCM failed with error: %@", error.localizedDescription);
          NSDictionary *userInfo = @{@"error":error.localizedDescription};
          [[NSNotificationCenter defaultCenter] postNotificationName:weakSelf.registrationKey
                                                              object:nil
                                                            userInfo:userInfo];
      }
  };
  </code></pre>
  
  <p>it's launchOptions code for GCM.<br>
  but when i run it, catch some error, like this:
  <a href="https://i.stack.imgur.com/oLVJP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oLVJP.png" alt="enter image description here"></a></p>