【发布时间】:2015-04-21 18:37:56
【问题描述】:
我看到其他人也问过同样的问题,例如iOS system alerts 和 receiving 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