TCC_CRASHING_DUE_TO_PRIVACY_VIOLATION

Hello, we have received a crash report from AppStore connect / Xcode, TCC_CRASHING_DUE_TO_PRIVACY_VIOLATION on an iPhone 12 Pro running iOS 18.1 (unfortunately, we don't know the user and how did they get the crash)

The log mentions NSPhotoLibraryAddUsageDescription, but we are not using photo library in any shape or form, do we still need to include this key in Into.plist? And what do we put there?

Thanks!

Full log will not fit here, but here is a about half of it, with parts that mention crash (Thread 7), PhotoLibraryServicesCore, PHPerformChangesRequest determineAuthorizationStatusForChanges (Thread 4) and Binary Images, including /System/Library/Frameworks/Photos.framework/Photos /System/Library/PrivateFrameworks/PhotoLibraryServicesCore.framework/PhotoLibraryServicesCore (not sure why are they there)


Incident Identifier: 5AFB7CCF-ECEC-40E1-AF71-02799924BC8C Distributor ID: com.apple.AppStore Hardware Model: iPhone13,3 Process: Polynomials [8291] Path: /private/var/containers/Bundle/Application/168A2A15-821B-414A-84B6-43C5184E5B59/Polynomials.app/Polynomials Identifier: com.graphmath.PolynomialsSbS Version: 5.1 (16) AppStoreTools: 16C5031b AppVariant: 1:iPhone13,3:18 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.graphmath.PolynomialsSbS [2383]

Date/Time: 2024-12-10 05:23:26.6944 +0200 Launch Time: 2024-12-10 05:16:45.7989 +0200 OS Version: iPhone OS 18.1 (22B5069a) Release Type: Beta Baseband Version: 5.10.01 Report Version: 104

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: TCC 0 This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryAddUsageDescription key with a string value explaining to the user how the app uses this data.

Triggered by Thread: 7 ... Thread 3: ... 9 UIKitCore 0x000000018dac114c closure #2 in InProcessAnimationManager.startAdvancing(_:) + 156 (InProcessAnimationManager.swift:900) 10 UIKitCore 0x000000018d5cd118 thunk for @escaping @callee_guaranteed @Sendable () -> () + 36 (<compiler-generated>:0) 11 Foundation 0x00000001898296c8 NSThread__start + 724 (NSThread.m:991) 12 libsystem_pthread.dylib 0x000000021304937c _pthread_start + 136 (pthread.c:931) 13 libsystem_pthread.dylib 0x0000000213044494 thread_start + 8

Thread 4 name: Thread 4: 0 libsystem_kernel.dylib 0x00000001daf24604 semaphore_wait_trap + 8 1 libdispatch.dylib 0x000000019288466c _dispatch_sema4_wait + 28 (lock.c:139) 2 libdispatch.dylib 0x0000000192884d20 _dispatch_semaphore_wait_slow + 132 (semaphore.c:132) 3 PhotoLibraryServicesCore 0x00000001a37cde70 -[PLPrivacy _checkAuthStatusForPhotosAccessScope:preflightStatus:promptIfUnknown:resultHandler:] + 532 (PLPrivacy.m:554) 4 PhotoLibraryServicesCore 0x00000001a37cd9e0 __87-[PLPrivacy _isPhotosAccessAllowedWithScope:promptIfUnknown:synchronous:resultHandler:]_block_invoke + 240 (PLPrivacy.m:587) 5 libdispatch.dylib 0x00000001928840d0 _dispatch_client_callout + 20 (object.m:576) 6 libdispatch.dylib 0x0000000192893750 _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1104) 7 PhotoLibraryServicesCore 0x00000001a37c2c44 -[PLPrivacy _isPhotosAccessAllowedWithScope:promptIfUnknown:synchronous:resultHandler:] + 156 (PLPrivacy.m:582) 8 PhotoLibraryServicesCore 0x00000001a385af74 -[PLPrivacy checkPhotosAccessAllowedWithScope:] + 136 (PLPrivacy.m:608) 9 Photos 0x00000001a2b99854 -[PHPerformChangesRequest determineAuthorizationStatusForChanges] + 52 (PHPerformChangesRequest.m:417) 10 Photos 0x00000001a2c59a78 __102-[PHPhotoLibrary _performCancellableChanges:withInstrumentation:onExecutionContext:completionHandler:]_block_invoke + 80 (PHPhotoLibrary.m:2044) ...

Thread 7 Crashed: 0 libsystem_kernel.dylib 0x00000001daf36ec4 __abort_with_payload + 8 1 libsystem_kernel.dylib 0x00000001daf56bec abort_with_payload_wrapper_internal + 104 (terminate_with_reason.c:102) 2 libsystem_kernel.dylib 0x00000001daf56c20 abort_with_payload + 16 (terminate_with_reason.c:124) 3 TCC 0x00000001ada4eb10 TCC_CRASHING_DUE_TO_PRIVACY_VIOLATION + 172 (TCC.c:579) 4 TCC 0x00000001ada4a210 ___tcc_server_send_request_authorization_block_invoke_3 + 124 (tcc_server.c:322) 5 TCC 0x00000001ada4e230 __tccd_send_message_block_invoke + 624 (TCC.c:0) 6 libxpc.dylib 0x00000002130adc40 _xpc_connection_reply_callout + 116 (serializer.c:119) 7 libxpc.dylib 0x00000002130a0390 _xpc_connection_call_reply_async + 80 (connection.c:894) 8 libdispatch.dylib 0x0000000192884150 _dispatch_client_callout3 + 20 (object.m:602) 9 libdispatch.dylib 0x00000001928a1b2c _dispatch_mach_msg_async_reply_invoke + 340 (mach.c:3102) 10 libdispatch.dylib 0x0000000192896f98 _dispatch_root_queue_drain_deferred_item + 336 (queue.c:7291) 11 libdispatch.dylib 0x00000001928967cc _dispatch_kevent_worker_thread + 500 (queue.c:6764) 12 libsystem_pthread.dylib 0x0000000213047cb4 _pthread_wqthread + 344 (pthread.c:2702) 13 libsystem_pthread.dylib 0x0000000213044488 start_wqthread + 8

Binary Images: ... 0x1a2b1e000 - 0x1a2e98fff Photos arm64e <286e53b489dc3526809cde731d193edd> /System/Library/Frameworks/Photos.framework/Photos 0x1a37bf000 - 0x1a38d8fff PhotoLibraryServicesCore arm64e <2ef5261171363f638de0424b4a0ad257> /System/Library/PrivateFrameworks/PhotoLibraryServicesCore.framework/PhotoLibraryServicesCore 0x1ada46000 - 0x1ada5dff0 TCC arm64e <8d07479816c73b24a7cc13b7e3f6f361> /System/Library/PrivateFrameworks/TCC.framework/TCC 0x1d6b63000 - 0x1d6b6bfff GraphicsServices arm64e <fc757e242f573d079372205db5a5d6fd> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices ...

Answered by yumorozov in 818100022

UPDATE: (sorry, cannot find how to edit my post, so will comment here) we have found what the problem is, we are using the WebView from WebKit to show related Wikipedia articles, and any user who is trying to save a picture from that web-page would get this crash, unless and until we put a record with NSPhotoLibraryAddUsageDescription into Info.plist

PS to admins: if it is better to delete this post, I can do it, just thought somebody else might benefit from it, too, thanks!

Does your app do anything with photos or the photo library? Are you using a third-party library that uses them?

Accepted Answer

UPDATE: (sorry, cannot find how to edit my post, so will comment here) we have found what the problem is, we are using the WebView from WebKit to show related Wikipedia articles, and any user who is trying to save a picture from that web-page would get this crash, unless and until we put a record with NSPhotoLibraryAddUsageDescription into Info.plist

PS to admins: if it is better to delete this post, I can do it, just thought somebody else might benefit from it, too, thanks!

TCC_CRASHING_DUE_TO_PRIVACY_VIOLATION
 
 
Q