gcm push notification: first success, then not registered in IOS

前端 未结 3 1413
暗喜
暗喜 2021-01-15 10:57

After all passages for receive the notification with google cloud messaging in IOS but i have this problem: i send the post in php for the notification with server key and d

3条回答
  •  Happy的楠姐
    2021-01-15 11:55

    My five cents In case you are having "notRegistered" error only when app is in production that was my mistake: I missed the that in the registration options provided in GCM:

    [[GGLInstanceID sharedInstance] tokenWithAuthorizedEntity:_gcmSenderID
                                                        scope:kGGLInstanceIDScopeGCM
                                                      options:_registrationOptions
                                                      handler:self.registrationHandler];
    

    There is an option kGGLInstanceIDAPNSServerTypeSandboxOption which should be set to NO in case of production

    Hope it helps!

提交回复
热议问题