pushd icon indicating copy to clipboard operation
pushd copied to clipboard

How to send custom field in push notification for IOS

Open YogeshLele opened this issue 12 years ago • 3 comments

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?

YogeshLele avatar Dec 09 '13 13:12 YogeshLele

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).

melv1n avatar Dec 10 '13 11:12 melv1n

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 avatar Mar 19 '14 20:03 acidfilez

@acidfilez Yes. This works. Thank a lot.

tmnuwan12 avatar May 22 '15 08:05 tmnuwan12