Apple推送通知中的自定义JSON

Jac*_*cek 0 c# push-notification apple-push-notifications ios

我想在推送通知中向Apple手机发送自定义JSON,而无需任何其他信息.
我会发送类似的东西:

{
    message: "Message bla bla"
    , type: 1
    , data: "Tekst" 
}
Run Code Online (Sandbox Code Playgroud)

我该怎么做?

P.J*_*P.J 5

你可以像这样创建JSON,如果你想在它中传递参数: -

{"aps":{"alert":"You got a new message","badge":1,"sound":"beep.wav"},"message":"Message bla bla","type":1,"data":"Tekst"}
Run Code Online (Sandbox Code Playgroud)

希望它可以帮助你..