【发布时间】:2015-05-05 15:28:43
【问题描述】:
我正在使用 push sharp 来创建远程通知。 但我收到的通知没有标题和查看/关闭按钮。
我使用的代码改编自 Here
这是我创建警报的方式
AppleNotificationAlert alert = new AppleNotificationAlert();
alert.ActionLocalizedKey = "View Alert";
alert.Body = message;
alert.AddLocalizedArgs(new object[] { "title", "Test Title"});
pushBroker.QueueNotification(new AppleNotification() .ForDeviceToken(deviceToken).WithAlert(alert).WithBadge(1).WithSound("sound.caf").WithCustomItem("level", level).WithContentAvailable(1));
我也尝试按如下方式指定警报正文,但它不显示查看/关闭按钮
pushBroker.QueueNotification(new AppleNotification() .ForDeviceToken(deviceToken).WithAlert("Alert Body").WithBadge(1).WithSound("sound.caf").WithCustomItem("level", level).WithContentAvailable(1));
【问题讨论】:
标签: apple-push-notifications pushsharp