I’ve been developing an app that requires access to the user’s microphone.

The app worked fine on iOS 9, but after upgrading to iOS 10, it started crashing. The error message displayed in the terminal reads as follows:

> 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 resolve this issue, edit the Info.plist file as source code and add the following lines:

    <key>NSMicrophoneUsageDescription</key>
    <string>Provide a description explaining why your app needs microphone access.</string>

Additionally, if your app needs access to the user’s camera, add the following:

    <key>NSCameraUsageDescription</key>
    <string>Provide a description explaining why your app needs camera access.</string>

If your app requires access to the user’s contacts, add this:

    <key>NSContactsUsageDescription</key>
    <string>This app requires access to your contacts.</string>

Happy coding!