Push notification 月球apns有效载荷中缺少可用内容
我需要用月球APN发送有效载荷。 目前我可以看到NotificationPayload的有效负载结构如下所示-Push notification 月球apns有效载荷中缺少可用内容,push-notification,apple-push-notifications,moonapns,Push Notification,Apple Push Notifications,Moonapns,我需要用月球APN发送有效载荷。 目前我可以看到NotificationPayload的有效负载结构如下所示- public class NotificationPayload { public NotificationPayload(string deviceToken); public NotificationPayload(string deviceToken, string alert); public Notification
public class NotificationPayload
{
public NotificationPayload(string deviceToken);
public NotificationPayload(string deviceToken, string alert);
public NotificationPayload(string deviceToken, string alert, int badge);
public NotificationPayload(string deviceToken, string alert, int badge, string sound);
public NotificationAlert Alert { get; set; }
public int? Badge { get; set; }
public Dictionary<string, object[]> CustomItems { get; }
public string DeviceToken { get; set; }
public string Sound { get; set; }
public void AddCustom(string key, params object[] values);
public string ToJson();
public override string ToString();
}
我试着增加习惯;但它在aps字符串之外添加了自定义属性。我在Node.js中使用了下面的方法。这对我很有用 agent.createMessage().device(device).contentAvailable('1').alert(“loc key”,“Title”:“Message”).send()
{"aps":{"alert":"Helo","badge":1,"content-available" : 1,"sound":"default"}}