pushd
pushd copied to clipboard
How to send custom field in push notification for IOS
I have bee trying to send custom fields in apns notification. It is possible in android(GCM) where I can send custom fields using data.key=value;
In IOS when the app receives the notification these fields are not visible.
How to go about it?
This would be either two things:
- You're not sending the JSON payload properly (mostly a format issue, see APNS reference at Apple Developer portal).
- The client is not picking up the payload properly (so the payloads arrives, but the client ignores it).
There is actuali a third reason, check the settings.coffe file look for payLoadFilter and add your costums fields.
payloadFilter: ['id','type']
That will get you this payload for example:
aps = { alert = "new event"; badge = 1; }; id = 1; type = 1; }
Greetings
@acidfilez Yes. This works. Thank a lot.