I\'m attempting to integrate GCM into our iOS app. I\'ve followed the instructions to update our project for GCM to no avail. Everything I try to register I get:
As usual as soon as I post a question to SO, the answer leaps out at me.
The routine:
[[GCMService sharedInstance] startWithConfig:[GCMConfig defaultConfig]];
which I knew I was calling in:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
right before
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
was needed in two locations... I missed that. Once I added it just before the call:
[[GGLInstanceID sharedInstance] tokenWithAuthorizedEntity:_gcmSenderID
scope:kGGLInstanceIDScopeGCM
options:_registrationOptions
handler:_registrationHandler];
in:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
everything started working. Delightful...