I need to send a payload using moon-apns. currently i can see that the payload structure of NotificationPayload is like below-
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();
}
Where is Content-Available? it must be the part of aps.. Is it missing or not available in moon-apns? if so how to send Content-Available as a part of aps as showed in below example-
{"aps":{"alert":"Helo","badge":1,"content-available" : 1,"sound":"default"}}
I tried Add custom ; but it adds custom property outside the aps string.
I have used below method in Node.js. It's working to me.
agent.createMessage().device(device).contentAvailable('1').alert("loc-key","Title": "Message").send();