gpt4 book ai didi

ios - 提供的注册 token 未注册

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:52:55 26 4
gpt4 key购买 nike

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

最佳答案

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

  1. token 与-[FIRMessagingDelegate messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken]相同

  2. GoogleService-Info.plistdownloaded来自与您的 Firebase 推送控制台相同的帐户。

  3. 更新到最新的 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.

关于ios - 提供的注册 token 未注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53009207/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com