提供的注册令牌未注册
The provided registration token is not registered
我正在尝试通过 Google 云功能为 iOS 发送推送通知,但 returns 错误 The provided registration token is not registered
。但我已经通过调试我的应用程序进行了检查,并且 FCM 注册令牌是正确的。之后,我尝试通过提供 FCM 令牌通过 Firebase 控制台将推送通知发送到单个设备,但由于 Unregistered registration token
而失败。为什么会发生这种情况,因为设备 FCM 令牌没有问题?
我想这应该是一些粗心的错误,你应该确定以下几点:
令牌与-[FIRMessagingDelegate messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken]
相同
GoogleService-Info.plist
downloaded 来自与您的 Firebase 推送控制台相同的帐户。
更新到最新的 Firebase SDK。
来自 Google Firebase document 的一些错误描述 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.
我也遇到了类似的错误。像这样。
FirebaseMessagingError: The provided registration token is not registered. A previously valid registration token can be unregistered for a variety of reasons. See the error documentation for more details. Remove this registration token and stop using it to send messages.
所以我简单地生成了一个新的令牌并将其替换为旧的。
它开始正常工作。
我正在尝试通过 Google 云功能为 iOS 发送推送通知,但 returns 错误 The provided registration token is not registered
。但我已经通过调试我的应用程序进行了检查,并且 FCM 注册令牌是正确的。之后,我尝试通过提供 FCM 令牌通过 Firebase 控制台将推送通知发送到单个设备,但由于 Unregistered registration token
而失败。为什么会发生这种情况,因为设备 FCM 令牌没有问题?
我想这应该是一些粗心的错误,你应该确定以下几点:
令牌与
-[FIRMessagingDelegate messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken]
相同
GoogleService-Info.plist
downloaded 来自与您的 Firebase 推送控制台相同的帐户。更新到最新的 Firebase SDK。
来自 Google Firebase document 的一些错误描述 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.
我也遇到了类似的错误。像这样。
FirebaseMessagingError: The provided registration token is not registered. A previously valid registration token can be unregistered for a variety of reasons. See the error documentation for more details. Remove this registration token and stop using it to send messages.
所以我简单地生成了一个新的令牌并将其替换为旧的。
它开始正常工作。