提供的注册令牌未注册 [英] The provided registration token is not registered
问题描述
我正在尝试通过Google云功能发送针对iOS的推送通知,但返回所提供的注册令牌未注册
的错误.但是我已经通过调试我的应用程序进行了检查,并且FCM注册令牌正确.之后,我尝试通过提供FCM令牌通过Firebase控制台向单个设备发送推送通知,但由于 Unregistered注册令牌
而失败.因为设备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:
-
令牌与
-[FIRMessagingDelegate消息传递:(FIRMessaging *)消息did 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可能决定刷新注册令牌,或者APNS令牌可能已针对iOS过期设备.
- 客户端应用已更新,但新版本未配置为接收消息.对于所有这些情况,请删除此注册令牌并停止使用它发送消息.
这篇关于提供的注册令牌未注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!