I have several pieces of metadata that I need to associate with a push notification.
For example user no, message id.
Can I send more parameters than what ap
You are not allowed to put custom tags inside aps tag. Here's what documentations says about it:
Providers can specify custom payload values outside the Apple-reserved aps namespace. Custom values must use the JSON structured and primitive types: dictionary (object), array, string, number, and Boolean.
So in your case you should do something like:
{
"aps": {
"alert": "Hello Push",
"sound": "default"
},
"People": {
"Address": "Your address here",
"Name": "Your Name here",
"Number": "XXXXXXXXXX"
}
}
Therefore you can read your custom payload with looking for it's key in main JSON, rather than in "aps":