简体   繁体   English

Firebase向iOS上的用户细分发送通知无法正常工作

[英]Firebase Send a Notification to a User Segment on iOS not working

I've installed according to the manual . 我根据手册安装了。

But only when I send the message to all iOS platform, only then I am getting the push notification . 但只有当我将消息发送到所有iOS平台时,才会收到推送通知 But when I am sending my massage to specific version or specific device for testing purposes, the massage is not received on the device. 但是当我将按摩发送到特定版本特定设备进行测试时,设备上不会收到按摩。 在此输入图像描述 在此输入图像描述 What could be the problem? 可能是什么问题呢?

The strange thing, is when I ran the application with a new version, I do not see this version in the versions dropdown for couple of days. 奇怪的是,当我使用新版本运行应用程序时,我没有在版本下拉列表中看到这个版本几天。 Even though that the code does reach 即使代码确实达到了

FIRApp.configure()

在此输入图像描述

  • ran the code with 2.5.5 version 运行2.5.5版本的代码

I was missing a pod :-/ 我错过了一个吊舱: - /

Instead of 代替

pod 'Firebase/Core'
pod 'Firebase/Messaging'

I had: 我有:

pod 'Firebase/Core'

Strangely, before the change, the project compiled and instanceID was generating, even though the pushes were not received to the device. 奇怪的是,在更改之前,编译的项目和instanceID正在生成,即使没有收到设备的推送。 Adding the missing pod fixed the problem. 添加丢失的pod修复了问题。

Are you sure you get the right token ? 你确定你得到了正确的令牌吗?

The token can be obtained by FIRInstanceID.instanceID().token()! 令牌可以通过FIRInstanceID.instanceID()。token()获得!

But The registration token may change when, 但是注册令牌可能会改变,

The app deletes Instance ID. 该应用程序删除实例ID。

The app is restored on a new device. 该应用程序将在新设备上恢复。

The user uninstalls/reinstall the app. 用户卸载/重新安装应用程序。

The user clears app data. 用户清除应用数据。

Double check your token and make sure you enter right token. 仔细检查您的令牌并确保输入正确的令牌。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM