Top
Updated Privacy Settings in iOS 10 – Noor Squared
fade
3597
post-template-default,single,single-post,postid-3597,single-format-standard,eltd-core-1.1.1,flow-ver-1.3.6,,eltd-smooth-page-transitions,ajax,eltd-blog-installed,page-template-blog-standard,eltd-header-type2,eltd-sticky-header-on-scroll-up,eltd-default-mobile-header,eltd-sticky-up-mobile-header,eltd-dropdown-default,wpb-js-composer js-comp-ver-5.0.1,vc_responsive

Updated Privacy Settings in iOS 10

Starting from iOS 10, apps accessing user sensitive data must provide the user with the reason behind accessing the data by adding short usage description keys to the Info.plist file. It is no longer sufficient to just prompt the user for permission. Private data includes Contacts, Calendar, Reminders, Photos, Bluetooth Sharing, Microphone, Camera, Location, Health, HomeKit, Media Library, Motion, CallKit, Speech Recognition, SiriKit, TV Provider. This restriction also applies to private data accessed by 3rd party libraries.

What happens if you attempt authorization without setting the keys?

If you attempt to access one of the listed APIs without providing a usage description key, the app will crash during runtime. Luckily, this is an easy fix, all you need to do is look through the crash log to identify the missing usage description and add it to the Info.plist file.

Example:

For example, one of my apps accesses the camera, and prior to adding the appropriate key to the Info.plist file, I got the following error:

Camera access not determined. Ask for permission. This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data. (lldb)

To fix this error, add the suggested key -NSCameraUsageDescription or Privacy – Camera usage description- to Info.plist under the ‘Key’ column and add a description string under the ‘Value’ column , see image below. As much as possible, try to provide transparent meaningful usage descriptions.

Another example below:

 

Remember, these values will be displayed to the user so if your app supports multiple languages, localize the usage description accordingly.

For more information on the topic, please check Apple’s Technical Q&A on the topic.

Noorin
No Comments

Sorry, the comment form is closed at this time.

Follow us on Instagram