original link
A big change in IOS 10 is stronger privacy data protection. This is described in the documentation:
You must statically declare your app ' s intended use of protected data classes by including the appropriate purpose string Keys in your info.plist file.
Simply said access to user data needs to be declared in info.plist now, otherwise it will be crash.
These user data include:
Contacts, Calendar, Reminders, Photos, Bluetooth sharing, microphone, Camera, location, health, HomeKit, Media Library, Mo tion, Callkit, Speech recognition, SiriKit, TV Provider.
Before 10 only need to get location configuration, now more stringent, such as the need to call the album access permissions, also need to configure privacy in Info.plist.
Fortunately, the names of these keys already have auto-completion in Xcode 8. Add an attribute, and an automatic prompt will appear after you enter privacy:
The string that follows is displayed in the description when the popup user allows it. Thank you @nidom for reminding me that if the description is empty, it will be rejected when submitting AppStore.
Welcome to my Weibo: @ No story of the Zhuo classmate
RELATED links:
Compatible with iOS 10: Configure the Get Privacy Data permission statement