Add buttons to push notification alert

后端 未结 2 1372
有刺的猬
有刺的猬 2020-12-11 07:27

Is there a way to set up how users see the push notifications alert box? My notifications are appearing without the view / cancel buttons, but i\'m receiving others from dif

相关标签:
2条回答
  • 2020-12-11 08:08

    There are two things going on in your question.

    First, you will see no buttons at all when you receive Apple Push Notification alerts and your screen is locked. All Apps will have just the Title and the Message of the Alert, without the buttons. If your phone is unlocked, you will see the buttons.

    Second, altering the Payload, you can customize the "View" button text (or remove it) Apple Push Documentation with the "action-loc-key" key. If you set it to null, only "OK" will be presented. If you specify a value, it must be a localized string in your Application and the "View" will be replaced with that value.

    0 讨论(0)
  • 2020-12-11 08:17

    Check out the docs -- as you can send the name of the "open app" button in the push notification payload. Here's apples take on it

    0 讨论(0)
提交回复
热议问题