Search code examples
iosobjective-cswiftpush-notificationnstextattachment

Can i customise push notification appearance in iOS?


I can't seems to find and control over push notification appearance. Is it so, or i am just missing something.

Have a look at the following image

Notification Window screen shot

what i actually want to achieve is to put NSTextAttachment in these notification texts.

As far as of now, i have gathered that this is something which can not be achieved because we don't have control over how iOS displays Push Notifications.

But i just want to be absolutely sure about this.


Solution

  • iOS will parse notification payload for "Alert", "Badge", "Sound" & "Content-Available" and as if it got these param, it will show up the notification and ignore remaining parameters.

    You can add up other parameters in payload, but that you can use in your app only not in notification tray i.e. you can not manipulate or say customise/style push notification view in notification tray because iOS do not allow to do so.

    Interactive Notifications: you can add action buttons or textfield to your notification those iOS have provided provision for, but as i said above, you cannot customise/style push notification .

    CONCLUSION: which specifically in your case, you cannot add NSTextAttachment.