简体   繁体   中英

Receive notification that user has disabled contacts on iOS

I'm using the address book API on iOS to gain access to system contacts. 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. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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