【问题标题】:Receive iOS system (e.g. SMS) notifications接收 iOS 系统(例如 SMS)通知
【发布时间】:2015-04-21 18:37:56
【问题描述】:

我看到其他人也问过同样的问题,例如iOS system alertsreceiving all alerts,没有得到答复。

我尝试了第二个代码,但它只接收该应用程序的所有警报。所以如果例如我在运行此应用的设备上收到短信提醒,我只收到以下信息:

Notification found with:

 name:     _UIApplicationWillAddDeactivationReasonNotification
 object:   <UIApplication: 0x14dd01a40>
 userInfo: {
"_UIApplicationDeactivationReasonUserInfoKey" = 10;
}
Notification found with:

 name:     UIApplicationWillResignActiveNotification
 object:   <UIApplication: 0x14dd01a40>
 userInfo: (null)

所以这只是应用程序上的短信对话框的效果,而不是短信通知。

据我所知,iOS 应用沙盒中无法接收所有系统通知(例如 Facebook、WhatsApp、Twitter、SMS、来电、未接来电等)。获得这些的唯一方法是通过可以请求 ANCS 的 BLE 外围设备。

这样对吗?

【问题讨论】:

    标签: ios notifications bluetooth-lowenergy core-bluetooth ancs


    【解决方案1】:

    你是对的。请求这些通知的唯一方法是通过 BLE ANCS 协议,该协议可由与 iOS 设备通信的外围设备订阅。

    我能想到的一个最重要的原因是避免人们能够通过本质上“抓取”并以恶意方式累积这些通知来进行任何形式的监控。

    【讨论】:

    • 谢谢罗伯特,出于安全原因,我同意这样做是有道理的。感谢您的评论和确认。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-19
    • 1970-01-01
    • 2010-11-29
    • 1970-01-01
    相关资源
    最近更新 更多