How to Fix iOS 10 Permission Crash Errors


Welcome to Continuous Improvement, the podcast where we delve into the world of app development and discuss common issues developers face on a regular basis. I’m your host, Victor, and in today’s episode, we’re going to address a problem that many of us have encountered - app crashes after an operating system update. Specifically, we’ll be focusing on an error related to privacy-sensitive data access while using the microphone on iOS 10.

So, picture this: You’ve developed an amazing app that runs smoothly on iOS 9. Everything is going great until you make the daring decision to upgrade to iOS 10. Suddenly, your app starts crashing, leaving you puzzled and frustrated. But fear not, my fellow developers! I am here to guide you through this ordeal.

The error message that appears in the terminal states, “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.” Quite a mouthful, right?

The solution is quite straightforward. To resolve this crash caused by microphone access, we need to make a quick edit in the Info.plist file. Essentially, we’ll be adding a description about why our app needs microphone access, so that it complies with iOS 10’s privacy requirements.

So, let’s jump into it. Open your Info.plist file as source code and insert the following lines:

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

By adding this snippet to your Info.plist file, you’re providing a clear message to users about why your app requires microphone access. This is a crucial step to ensure compliance with iOS 10’s privacy rules.

Now, let’s not forget about potential crashes related to camera or contacts access. If your app requires these permissions, be sure to include the appropriate lines in your Info.plist file as well.

For camera access:

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

And for contacts access:

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

Remember, providing users with clear and concise explanations for why your app needs these privacy-sensitive permissions is vital to maintaining user trust and satisfaction.

And that’s it! By making these edits, you’ll be able to successfully prevent crashes caused by privacy-sensitive data access after updating to iOS 10.

Well, that’s all for today’s episode. I hope you found this information useful and it helps you overcome the microphone access crash issue.

If you have any questions or topics you’d like me to cover in future episodes, feel free to reach out to me on Twitter @VictorDev.

Thanks for tuning in to Continuous Improvement. Until next time, happy coding!