Azure 通知中心 iOS 模板不再接受徽章字段?

Azure Notification Hub iOS template not accepting badge field anymore?

我们正在使用 Xamarin 的 Azure 消息组件注册模板推送通知。 到目前为止,我们已经使用以下模板注册通知:

@"{""aps"": {""alert"": ""$(message)"",""badge"": ""$(badge)"",""sound"": ""$(sound)""}}"

我们正在将此字符串传递给 iOS 应用程序中的 Hub.RegisterTemplateAsync

自从一段时间前(不到一个月)以来,对 RegisterTemplateAsync 的调用生成了以下响应:

Apr  3 13:35:03 iPhone MyApp[352] <Warning>: Error Response:<Error><Code>400</Code><Detail>The supplied notification payload is invalid.TrackingId:5dbf4199-cf52-4245-b8e4-acfa4e00cfee_G7,TimeStamp:4/3/2016 10:35:04 AM</Detail></Error>
Apr  3 13:35:03 iPhone MyApp[352] <Warning>: -------------> Notifications: RegisterTemplateAsync error: Fail to perform registration operation. Response:<Error><Code>400</Code><Detail>The supplied notification payload is invalid.TrackingId:5dbf4199-cf52-4245-b8e4-acfa4e00cfee_G7,TimeStamp:4/3/2016 10:35:04 AM</Detail></Error>

它与以前工作的二进制文件完全相同。现在没有了。

在排查问题时,我们发现问题出在 badge 字段。当我们删除它时,通知中心注册成功:

@"{""aps"": {""alert"": ""$(message)"",""sound"": ""$(sound)""}}";

所以现在我们在 AppStore 中有一个损坏的生产应用程序,无法再收到通知。

这是在集线器端发生了变化还是我们有可能做错了什么?

您是否尝试过使用“#(badge)”而不是“$(badge)”?