iospermissionscrashprivacyios-permissions

__CRASHING_DUE_TO_PRIVACY_VIOLATION__


In Crashlytics, I can see iOS 10 users are getting this crash frequently. However, when I test in Simulator using iPhone 7/10.2, I'm unable to reproduce the crash. In my plist, I already have strings for

NSCalendarsUsageDescription, NSMicrophoneUsageDescription, and NSPhotoLibraryUsageDescription.

Here is the stacktrace from Crashlytics:

Crashed: com.apple.root.default-qos
0  libsystem_kernel.dylib         0x183765d74 __abort_with_payload + 8
1  libsystem_kernel.dylib         0x18376249c <redacted> + 100
2  libsystem_kernel.dylib         0x1837624c8 abort_with_payload + 10
3  TCC                            0x1869d6328 __TCCAccessRequest_block_invoke_2.80 + 258
4  TCC                            0x1869d6224 __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 702
5  TCC                            0x1869d9330 __tccd_send_block_invoke + 348
6  libxpc.dylib                   0x18386afcc _xpc_connection_reply_callout + 80
7  libxpc.dylib                   0x18386af3c _xpc_connection_call_reply + 40
8  libdispatch.dylib              0x1836221bc _dispatch_client_callout + 16
9  libdispatch.dylib              0x183630a4c _dispatch_queue_override_invoke + 732
10 libdispatch.dylib              0x18363234c _dispatch_root_queue_drain + 572
11 libdispatch.dylib              0x1836320ac _dispatch_worker_thread3 + 124
12 libsystem_pthread.dylib        0x18382b2a0 _pthread_wqthread + 1288
13 libsystem_pthread.dylib        0x18382ad8c start_wqthread + 4

Any clue how to reproduce or fix this? I do allow user to access contacts, but I am not prompted for any permission when I test that feature in simulator. However, when the user accesses the camera from my app, the simulator does prompt me for a permission. That makes me think that a string is not needed for accessing contacts.


Solution

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