The provided registration token is not registered

谁说胖子不能爱 提交于 2021-02-16 20:39:19

问题


I'm trying to send push notification for iOS via Google cloud functions but it returns error that The provided registration token is not registered. But I've checked it by debugging my app and the FCM registration token is correct. After that I've tried to send push notification via Firebase console to single device by providing FCM token but it failed due to Unregistered registration token. How this happens because there is no issue with device FCM token?


回答1:


I think it should be some careless mistake, you should make sure the things below:

  1. The token is same with -[FIRMessagingDelegate messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken]

  2. The GoogleService-Info.plist is downloaded from the same account with your Firebase push console.

  3. Updated to the latest Firebase SDK.

From the Google Firebase document are some description of your error The provided registration token is not registered.

The provided registration token is not registered. A previously valid registration token can be unregistered for a variety of reasons, including:

  • The client app unregistered itself from FCM.
  • The client app was automatically unregistered. This can happen if the user uninstalls the application or, on iOS, if the APNS Feedback Service reported the APNS token as invalid.
  • The registration token expired. For example, Google might decide to refresh registration tokens or the APNS token may have expired for iOS devices.
  • The client app was updated, but the new version is not configured to receive messages. For all these cases, remove this registration token and stop using it to send messages.


来源:https://stackoverflow.com/questions/53009207/the-provided-registration-token-is-not-registered

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!