We are receiving these crash reports on iOS 11 (they occur on a background thread on the "com.apple.root.default-qos" queue).
libsystem_kernel.dylib 0x1831a00a8 __abort_with_payload + 8
libsystem_kernel.dylib 0x18319b100 abort_with_payload_wrapper_internal + 100
libsystem_kernel.dylib 0x18319b12c system_set_sfi_window + 10
TCC 0x1860ed99c __TCCAccessRequest_block_invoke_2.85 + 222
TCC 0x1860ed8bc __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 706
TCC 0x1860f113c __tccd_send_block_invoke + 316
libxpc.dylib 0x1832eda0c _xpc_connection_reply_callout + 60
libxpc.dylib 0x1832ed948 _xpc_connection_call_reply_async + 88
libdispatch.dylib 0x18300d758 _dispatch_client_callout3 + 16
libdispatch.dylib 0x183025060 _dispatch_mach_msg_async_reply_invoke$VARIANT$mp + 324
libdispatch.dylib 0x183013f54 _dispatch_queue_override_invoke$VARIANT$mp + 400
libdispatch.dylib 0x18301a1c8 _dispatch_root_queue_drain + 596
libdispatch.dylib 0x183019f10 _dispatch_worker_thread3 + 120
libsystem_pthread.dylib 0x1832b3130 _pthread_wqthread + 1268
libsystem_pthread.dylib 0x1832b2c30 start_wqthread + 4The stack trace doesn't help much except for the __CRASHING_DUE_TO_PRIVACY_VIOLATION__ symbol. We do have these keys specified in Info.plist:
- NSPhotoLibraryUsageDescription
- NSCameraUsageDescription
- NSLocationWhenInUseUsageDescription
I am pretty sure we don't try to access contacts, health data or anything else requiring a permission from users. Also, we haven't been able to reproduce the problem during our internal testing. Still, it looks like in certain rare circumstances (for about 1 in 1500 users) the app is trying to access some private data.
Does anybody have a clue how to debug and fix these privacy violation crashes? Can it be a 3rd party keyboard extension, a data detector in a Safari view controller or anything like that?
Thanks in advance.
Are you getting the crash reports from iTunes Connect? Typically, the termination reason is at the top of the system generated crash reports, for example:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: TCC, This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
Triggered by Thread: 3I can create this exact thread by accessing Photos using PHPhotoLibrary without NSPhotoLibraryUsageDescription:
Thread 2 name: Dispatch queue: com.apple.mobileslideshow.accessCallbacks
Thread 2:
0 libsystem_kernel.dylib 0x00000001816b4c00 semaphore_wait_trap + 8
1 libdispatch.dylib 0x0000000181572024 _dispatch_sema4_wait$VARIANT$armv81 + 24
2 libdispatch.dylib 0x00000001815729c0 _dispatch_semaphore_wait_slow + 124
3 AssetsLibraryServices 0x000000018f0e29c4 __79-[PLPrivacy _isPhotosAccessAllowedWithScope:forceHandler:accessAllowedHandler:]_block_invoke_2 + 416
4 AssetsLibraryServices 0x000000018f0ccd98 __pl_dispatch_async_block_invoke + 36
5 libdispatch.dylib 0x0000000181541088 _dispatch_call_block_and_release + 24
6 libdispatch.dylib 0x0000000181541048 _dispatch_client_callout + 16
7 libdispatch.dylib 0x000000018157f1c0 _dispatch_queue_serial_drain$VARIANT$armv81 + 520
8 libdispatch.dylib 0x000000018157fb30 _dispatch_queue_invoke$VARIANT$armv81 + 340
9 libdispatch.dylib 0x0000000181580528 _dispatch_root_queue_drain_deferred_wlh$VARIANT$armv81 + 380
10 libdispatch.dylib 0x00000001815885c4 _dispatch_workloop_worker_thread$VARIANT$armv81 + 640
11 libsystem_pthread.dylib 0x00000001817e6fd0 _pthread_wqthread + 932
12 libsystem_pthread.dylib 0x00000001817e6c20 start_wqthread + 4Does anybody have a clue how to debug and fix these privacy violation crashes? Can it be a 3rd party keyboard extension, a data detector in a Safari view controller or anything like that?
The crash report will tell you which process crashed, and the code path triggering this must be within that process.