小编Sia*_*ter的帖子

Gcm iOS,订阅主题,错误代码3004

我正在尝试在iOS上订阅gcm主题.

GCMPubSub.sharedInstance().subscribeWithToken(registrationId, topic: "/topics/mytopic", options: nil) { error in  
    print(error.localizedDescription) 
}
Run Code Online (Sandbox Code Playgroud)

该操作无法完成.(com.google.gcm错误3004.)

我无法在任何地方找到此错误代码的文档.我还阅读了定义错误的源代码,它看起来像这样:

typedef NS_ENUM(NSUInteger, GCMServiceErrorCode) {
  /**
   *  HTTP errors.
   */

  // InvalidRequest -- Some parameters of the request were invalid.
  kGCMServiceErrorCodeInvalidRequest = 0,

  // Auth Error -- GCM couldn't validate request from this client.
  kGCMServiceErrorCodeAuthentication = 1,

  // NoAccess -- InstanceID service cannot be accessed.
  kGCMServiceErrorCodeNoAccess = 2,

  // Timeout -- Request to InstanceID backend timed out.
  kGCMServiceErrorCodeTimeout = 3,

  // Network -- No network available to reach …
Run Code Online (Sandbox Code Playgroud)

google-app-engine publish-subscribe ios google-cloud-messaging

9
推荐指数
1
解决办法
1153
查看次数