Amol Prakash
Amol Prakash

Reputation: 257

iOS push/local notifications with image like in iMessage

I want to display an image (custom view) in Notification Center when app receives push/local notification. e.g -

enter image description here

or

enter image description here How could I achieve the same? Can anyone help me?

Upvotes: 1

Views: 1968

Answers (1)

Paddy
Paddy

Reputation: 764

No you can't. The notification payload contains up to 256 bytes long. You can't send an image with it however you can send image URL with payload and show it in your application.

The official documentation does not provide information about this. Currently, it is possible but I guess this feature is Apple exclusive.

Adding to that what you have shown in the images is called Widget, you can create it using this link.

Upvotes: 1

Related Questions