【发布时间】:2015-11-11 17:40:31
【问题描述】:
我们可以使用 GCM 通知作为 APNS 徽章图标在 iPhone 应用上显示徽章编号
因为我无法使用 GCM 进行设置。 我已经引用了this link,上面写着
Parameter Platform Usage Description
badge iOS Optional,string Indicates the badge on client app home icon.
我正在接收来自 GCM 的通知,但在后台状态下收到通知时未显示徽章图标。
谁能告诉我如何设置这个
【问题讨论】:
-
徽章号码确实有效,您发送的信息是什么?
-
我正在使用gcm-alert.appspot.com 来测试和用于 android 和 iOS 的常用消息为 "Message" = "Hello message"
-
我要问的是你发送的 json 是什么?例如您必须将
badge放入您的消息的notification字典中。例如{ "notification" : { "body" : "Hello message", "badge" : "1" } }
标签: ios objective-c google-cloud-messaging apple-push-notifications badge