Fix iOS 10 permission crashes error

I am developing an app with request access to user’s microphone. It was working fine with iOS 9, but since upgrade to iOS 10, it terminates with error message shown in the terminal:

This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.
(lldb)

To solve the problem, edit the Info.plist file as source code and add the following:

<key>NSMicrophoneUsageDescription</key>    
<string>Some microphone description whatever you want</string>

For your reference, in case you need access to user’s camera, use the follow:

<key>NSCameraUsageDescription</key>    
<string>Some kind of camera request description</string>

Or request for contacts access for your reference.

<key>NSContactsUsageDescription</key>    
<string>This app request access for your contacts</string>

Happy coding!

By Victor Leung

Experience in software development, consulting services and technical product management. Understanding of business and technology with an MBA in Finance and a Master degree in Computer Science. AWS Certified Solution Architect with experience in building products from scratch and serving as a charismatic leader.

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.