Google Cloud Messaging shows “notRegistered” when using iOS distributed app

I have implemented a GCM service on an iOS app. I use PHP to send GCM at the server. It works perfectly when the app is signed by a development provisioning profile.

That is, when the app registers itself using the GCM Config, it always returns a functioning device token. I can send a notification to the device using the token without any error.

  • Taptic in iOS 9
  • GCM IOS NotRegistered issue
  • how to embed navigation controller in a view programmatically?
  • how to determine which tabbar index is my view controller
  • Which is the best method to display thumbnail images on UIScrollview (downloaded from server)
  • WKWebView in Interface Builder
  • But after I sign the app by distributed provisioning profile and test the app by TestFlight or Ad Hoc Provisioning, I received a “Not Registered” error.

    {“multicast_id”:8921098464640731057,”success”:0,”failure”:1,”canonical_ids”:0,”results”:[{“error”:”NotRegistered”}]}”

    How does it happen? Any Solution?
    I have checked that I enabled APNS in both development and distribution provisioning profile.

    I did not enable TLS on my server. Actually my SSL Cert is not ready so I can’t test it. Is this the reason?

    Solutions Collect From Internet About “Google Cloud Messaging shows “notRegistered” when using iOS distributed app”

    Are you setting the kGGLInstanceIDAPNSServerTypeSandboxOption to NO when you build your app for Distribution?

    Your APNS token is being rejected by APNS server and that’s when GCM unregisters the GCM registration token for your app and you start seeing the NotRegistered error.

    Here is the documentation for the flag.