简体   繁体   English

收到有关用户已禁用iOS上的联系人的通知

[英]Receive notification that user has disabled contacts on iOS

I'm using the address book API on iOS to gain access to system contacts. 我在iOS上使用通讯录API来访问系统联系人。 I would like to be notified if the user disables or enables contacts for the application (via the Settings app). 如果用户禁用或启用了应用程序的联系人(通过“设置”应用程序),我想得到通知。

Is there any such notification? 有这样的通知吗?

Whilst I am currently using the address book API, I am willing to move to the new (in iOS 9) contacts framework if it provides this feature. 尽管我目前正在使用通讯簿API,但如果它提供了此功能,我愿意转到新的(在iOS 9中) 联系人框架 Alas, I see no mention of it in the docs. ,我在文档中没有提到它。

Can anyone shed light on how one can be notified that the user has modified the contacts access for one's application? 任何人都无法阐明如何通知用户用户已修改其应用程序的联系人访问权限吗?

When the user changes iOS-level privacy permissions such as contacts, location access, photos, microphone etc. for a particular app, that app is killed. 当用户更改特定应用程序的iOS级隐私权限(例如联系人,位置访问权限,照片,麦克风等)时,该应用程序将被杀死。 So there should be no need to listen for such a notification because the app will be relaunched the next time the user tries to access it. 因此,无需监听此类通知,因为该应用程序将在用户下次尝试访问它时重新启动。

You can see this happen if you try to change permissions while the app is connected to the debugger - from XCode, it looks like the app crashed. 如果在应用程序连接到调试器时尝试更改权限,就会看到这种情况-从XCode看,应用程序崩溃了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM