__CRASHING_DUE_TO_PRIVACY_VIOLATION__

I had to add a string for NSCameraUsageDescription in the plist because user is allowed to take photos.


The __CRASHING_DUE_TO_PRIVACY_VIOLATION__ crash happens whenever there is a mandatory permission string missing on the app's plist. Permissions level are changed by Apple with new iOS versions sometimes. So code that was working will start breaking with iOS updates that have new requirements for the plists.

You should evaluate what of the permissions listed on all the answers here may affect you (NSFaceIDUsageDescription, NSCameraUsageDescription, NSPhotoLibraryAddUsageDescription, others?) as you may not be using any of those features on your app.

In my case, we support a Bluetooth BLE device and from iOS13 there was a new mandatory permission needed: NSBluetoothAlwaysUsageDescription so I added to my plist:

<key>NSBluetoothAlwaysUsageDescription</key>
    <string>We use Bluetooth to connect to your ... while the app is in the background</string>

And that fixed it.


If you're seeing these crashes on iPhone X and you use Touch ID/Face ID, the reason might be a lack of NSFaceIDUsageDescription key in your Info.plist. The key was added in iOS 11 and looks like it might have become mandatory after iOS 11.3, given that I see a spike of crashes on iPhone X after iOS 11.3 was released. It's vaguely documented by Apple here:

NSFaceIDUsageDescription (String - iOS). This key lets you describe the reason your app uses Face ID.

Important: To protect user privacy, an iOS app that links on or after iOS 11 and that would access Face ID if the hardware supports it, must statically declare the intent to do so. Include the NSFaceIDUsageDescription key in your app’s Info.plist file and provide a purpose string for this key. If your app attempts to access Face ID without a corresponding purpose string, your app may exit.

This key is supported in iOS 11 and later.

Interestingly enough, I wasn't able to reproduce the crash on iOS 11.3 on my development iPhone X, maybe it behaves differently in debug or TestFlight builds. Still worth adding the key when you use Face ID in your app, if we believe Apple's documentation.


Let's understand two things.

In the plist file there so many privacy keys for example camera usage, contact usage location usage, face id usage, etc... if you miss any of the keys and try to use those features you will get a crash, so use keys and description for avoding crash.

2nd thing is, especially for NSPhotoLibraryUsageDescription, if you were using this key from above iOS 6 and below iOS 11.3 then you will not get any crash, but after iOS 11.3 and later you need to add one more key which is NSPhotoLibraryAddUsageDescription.

At the same time, you may use both keys if your app is iOS 8 or 9 or above to latest iOS 11.3 and higher.

Reference for all the keys