Thread 1 Crashed:
0 libsystem_kernel.dylib 0x1e81a458 __abort_with_payload + 24
1 libsystem_kernel.dylib 0x1e817dd9 system_set_sfi_window + 1
2 TCC 0x20f27c4f __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 229
3 TCC 0x20f27b6b __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 1
4 TCC 0x20f2a383 __tccd_send_block_invoke + 339
5 libxpc.dylib 0x1e90215f _xpc_connection_reply_callout + 47
6 libxpc.dylib 0x1e902101 _xpc_connection_call_reply + 27
7 libdispatch.dylib 0x1e72649b _dispatch_queue_override_invoke + 605
8 libdispatch.dylib 0x1e727a91 _dispatch_root_queue_drain + 379
9 libdispatch.dylib 0x1e7278b7 _dispatch_worker_thread3 + 107
10 libsystem_pthread.dylib 0x1e8ce937 _pthread_wqthread + 1169
11 libsystem_pthread.dylib 0x1e8ce48c start_wqthread + 8
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 NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data. Triggered by Thread: 1 I don't know what permissions i need to add.
iOS 10 onwards, when you access privacy sensitive resources like camera, microphone you should add usage description text to info.plist.
This text will be shown in alert asking user to grant permission to access the resource when your code tries to access the resource for the first time.
So you should put appropriate message explaining why your app needs the resource :)
Add key NSMicrophoneUsageDescription and a text description to info.plist and it will not crash again :)
Just add NSMicrophoneUsageDescription key & in value add the justification that why your app is using Microphone. This is the latest requirement in iOS 10.
只需在info plist中添加“NSMicrophoneUsageDescription”,即可从所需的麦克风访问私人数据。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.