ios - 您可以发送不唤醒手机的 iOS 推送通知吗?

标签 ios iphone

我想知道是否可以将推送通知“提醒”到 iOS 设备,如果屏幕关闭则不会唤醒手机。

需要说明的是,我仍然希望通过另一种方法唤醒手机后,此通知会出现在锁定屏幕/通知下拉列表中。

最佳答案

是的,从 iOS 7 开始,您可以发送“无声”通知。

来自 iOS 7 release notes :

Apps supporting either the fetch or remote-notification background modes may be launched or moved from the suspended to background state at appropriate times. In the case of the fetch background mode, the system uses available information to determine the best time to launch or wake apps. For example, it does so when networking conditions are good or when the device is already awake. You can also send silent push notifications—that is, notifications that do not display alerts or otherwise disturb the user.

另见 Apple Push Notification Service文档,特别是通知负载部分,了解如何发送静默通知。

关于ios - 您可以发送不唤醒手机的 iOS 推送通知吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30059141/

相关文章:

ios - 在 iPad 上,当浏览器为 'closed' 时,如何使网页上的嵌入声音停止播放?

iphone - 如何使用Core Data有效保存UI/主线程中所做的更改?

iphone - Mac 地址已更改

iphone - 3D 动画 - CABasicAnimation 和 CATransform3D 提供 View 之间的间隙

ios - iPhone 6 的不同 Storyboard

ios - 为什么用swift录制后听不到音乐?

ios - 在模拟器中运行应用程序时删除本地通知的 iOS 权限警报

ios - iOS App Store用户评论通知

ios - Swift - 导入和打开自定义文件扩展名

iphone - 应用程序因委托(delegate)而崩溃