You need to ask the use permission before access the user private data like contact number, photos, location, calendar, etc. in iOS 10 Apple extended the scope of privacy control. You have to declare in Info.plist file access of any private data.
Calendar, Contact, Reminder, Photo, Bluetooth Sharing, Microphone, Camera, Location, Heath, HomeKit, Media Library, Motion, CallKit, Speech Recognition, SiriKit, TV Provider.
If you don't provide the privacy key in Info.plist, your app will crash. You will see a message like this:
The app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app user how the app uses this data.
To solve this, go to Info.plist file and add the privacy key according to your requirement.