2

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

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

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

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

4

2 回答 2

1

确保“请勿打扰”已关闭。前往“设置”>“请勿打扰”。

于 2019-02-19T18:10:14.790 回答
0

嗨,您是用于推送通知的 json 格式不正确。请看这篇文章

小例子:

"aps": {
         "badge": 11,
         "alert": "Hello world!"
    }
于 2014-09-13T13:39:50.077 回答