Add buttons to push notification alert

后端 未结 2 1381
有刺的猬
有刺的猬 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.

提交回复
热议问题