提供的注册令牌未注册 [英] The provided registration token is not registered

查看:31
本文介绍了提供的注册令牌未注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 Google 云功能为 iOS 发送推送通知,但它返回了所提供的注册令牌未注册的错误.但是我已经通过调试我的应用程序进行了检查,并且 FCM 注册令牌是正确的.之后,我尝试通过提供 FCM 令牌通过 Firebase 控制台向单个设备发送推送通知,但由于 未注册的注册令牌 而失败.这是怎么发生的,因为设备 FCM 令牌没有问题?

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?

推荐答案

我认为应该是一些粗心的错误,你应该确保以下几点:

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

  1. 令牌与-[FIRMessagingDelegate messages:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken]

GoogleService-Info.plist下载 来自与您的 Firebase 推送控制台相同的帐户.

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

已更新到最新的 Firebase SDK.

Updated to the latest Firebase SDK.

来自 Google Firebase 文档是对您的错误的一些描述提供的注册令牌未注册.

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:

  • 客户端应用从 FCM 注销了自己.
  • 客户端应用已自动注销.如果用户卸载应用程序,或者在 iOS 上,如果 APNS 反馈服务报告 APNS 令牌无效.
  • 注册令牌已过期.例如,Google 可能会决定刷新注册令牌,或者 iOS 的 APNS 令牌可能已过期设备.
  • 客户端应用已更新,但新版本未配置为接收消息.对于所有这些情况,请删除此注册令牌并停止使用它来发送消息.

这篇关于提供的注册令牌未注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆