rs / pushd

Blazing fast multi-protocol mobile and web push notification service
MIT License
1.16k stars 224 forks source link

How to set title for iOS 10 in pushd? #160

Open alirezastack opened 6 years ago

alirezastack commented 6 years ago

In Apple iOS documentation it is mentioned that:

alert string or dictionary

If this property is included, the system displays a standard alert or a banner, based on the user’s setting. You can specify a string or a dictionary as the value of alert. If you specify a string, it becomes the message text of an alert with two buttons: Close and View. If the user taps View, the app launches. If you specify a dictionary, refer to Table 5-2 for descriptions of the keys of this dictionary.

title string

A short string describing the purpose of the notification. Apple Watch displays this string as part of the notification interface. This string is displayed only briefly and should be crafted so that it can be understood quickly. This key was added in iOS 8.2.

body string

The text of the alert message.

Now I want to set title for the push notification to be shown on iOS, I have sent the below payload:


{'data.project': {u'ack': 0,
              u'c': {u'id': u'SOME DATA'},
              u'ca': 1,
              u't': u'e/user',
              u'v': u'1',
              u'vm': 2},
 'msg': 'My message',
 'title': 'My custom title'}

The push is sent but no title is set on the mobile device. Does pushd support it? What should I do?