title: iOS GCM GCMPubSub Unsubscription Error 7 - Unknown Error
body: <p>For GCM topic messaging, whilst trying to unsubscribe from a topic I'm getting the following in my log (see code below)</p>
  
  <pre><code>Failed to unsubscribe from topic /topics/testTopicName: Error Domain=com.google.gcm Code=7 "The operation couldn’t be completed. (com.google.gcm error 7.)"
  </code></pre>
  
  <p>Now, I'm able to subscribe to the topic with the same registration token, as well as receiving topical messages for this topic, yet I'm not able to unsubscribe from it. I'm getting this every time when trying to unsubscribe. According to <a href="https://developers.google.com/cloud-messaging/ios/client" rel="nofollow">Google</a>, "7" is an "unknown error" - great...</p>
  
  <p>I've observed the same behaviour for all the topics I've created so far.</p>
  
  <pre><code>+ (void)unsubscribeFromGCMTopic:(NSString*)topicName
  {
  AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate];
  
  // If the app has a registration token and is connected to GCM, proceed to unsubscribe from the
  // topic
  if (app.registrationToken &amp;&amp; app.connectedToGCM)
  {
      NSString* topic = [NSString stringWithFormat:@"%@%@", TOPIC_PREFIX, topicName];
  
      [[GCMPubSub sharedInstance] unsubscribeWithToken:app.registrationToken
                                                 topic:topic
                                               options:nil
                                               handler:^void(NSError *error)
                                               {
                                                   if (error)
                                                   {
                                                       NSLog(@"Failed to unsubscribe from topic %@: %@", topic, error);                                                        
                                                   }
                                                   else
                                                   {
                                                       // Unsubscribe successfully
                                                       NSLog(@"Successfully unsubscribe from topic %@", topic);
                                                   }
                                               }];
  }
  else
  {
      NSLog(@"Cannot GCM unsubscribe from %@. Token %@. GCM connection status %d", topicName, app.registrationToken, app.connectedToGCM);
  }
  }
  </code></pre>
  
  <p>Any ideas? Thanks in advance!</p>