iOS推送通知未在LockScreen上显示

时间:2022-09-10 20:20:53

In my app, I have this:

在我的应用程序中,我有这个:

[[UIApplication sharedApplication] registerForRemoteNotificationTypes: UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound];

However, when I send notification from my web server via ApnsPHP, badge is actualized, but there is no message on lock screen. Message can be found only in notification center.

但是,当我通过ApnsPHP从我的Web服务器发送通知时,徽章已实现,但锁定屏幕上没有消息。消息只能在通知中心找到。

Do I have to do something more to enable notifications on Lock Screen ?

我是否还需要做更多事情才能在锁定屏幕上启用通知?

1 个解决方案

#1


0  

Hi you're json for push notification is not well formatted.Please look at this article

嗨你是json推送通知格式不正确。请看这篇文章

Small example :

小例子:

"aps": {
         "badge": 11,
         "alert": "Hello world!"
    }

#1


0  

Hi you're json for push notification is not well formatted.Please look at this article

嗨你是json推送通知格式不正确。请看这篇文章

Small example :

小例子:

"aps": {
         "badge": 11,
         "alert": "Hello world!"
    }