我正在尝试通过 Google 云功能发送 iOS 推送通知,但它返回错误 提供的注册 token 未注册 。但是我已经通过调试我的应用程序进行了检查,并且 FCM 注册 token 是正确的。之后,我尝试通过提供 FCM token 通过 Firebase 控制台向单个设备发送推送通知,但由于 未注册的注册 token 而失败。由于设备 FCM token 没有问题,这是怎么发生的?
Best Answer-推荐答案 strong>
我认为这应该是一些粗心的错误,你应该确保以下几点:
token 与-[FIRMessagingDelegate messagingFIRMessaging *)messaging didReceiveRegistrationTokenNSString *)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.
关于ios - 提供的注册 token 未注册,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/53009207/
|