0

I want to show title as ${USER_FRIENDLY_NAME} and body as ${MESSAGE} in Push noification of Programmable chat in twilio

I tried to configure in Push Notification Configuration module of Programmable chat of twilio console.

Right now show:

enter image description here

Expected Result:

enter image description here

If somebody could help, it would be really appreciated:)

iParesh
  • 2,338
  • 1
  • 18
  • 30

2 Answers2

0

You can catch every detail of your push notification by setting up NotificationServiceExtension and NotificationContent in your Xcode project. If you don't have an idea about these stuff, these are used in rich push notification.

In your UNNotificationServiceExtension, you could catch your data there and decide what to show to the user.

func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void)

Helpful links:

https://www.raywenderlich.com/8164-push-notifications-tutorial-getting-started

https://www.pluralsight.com/guides/creating-ios-rich-push-notifications

Glenn Posadas
  • 12,555
  • 6
  • 54
  • 95
  • I need to configure through twilio service not programatically in ios – iParesh Jan 21 '19 at 10:31
  • Then I suppose your question is not a programming question for SO. You should file a ticket or contact their CS if you can't find a solution here. – Glenn Posadas Jan 21 '19 at 10:34
0

Twilio developer evangelist here.

You can setup a template for your push notifications so they appear with the text that you want.

Check out the documentation for Twilio Chat Push Notification templates for more information.

I'm not sure there are specific title and subtitles available within iOS push notifications, but if you need to include a line break. Have you tried including "\n" within your template?

philnash
  • 70,667
  • 10
  • 60
  • 88