Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Crash: __CRASHING_DUE_TO_PRIVACY_VIOLATION__

Here is part of my crash report.

#0. com.apple.contacts.store
0  libsystem_kernel.dylib         0x18c34d1c4 semaphore_wait_trap + 8
1  libdispatch.dylib              0x18c2387d8 _dispatch_semaphore_wait_slow + 216
2  Contacts                       0x195b99584 +[CNAuthorization requestAccessWithTimeout:entityType:] + 224
3  Contacts                       0x195b6288c -[CNiOSAddressBookDataMapper requestAccessForEntityType:error:] + 40
4  Contacts                       0x195b733fc -[CNDataMapperContactStore unifiedContactCountWithError:] + 60
5  ContactsUI                     0x196b7603c -[CNContactStoreSnapshot countOf_contacts] + 144
6  ContactsUI                     0x196b78820 -[CNContactStoreSnapshot prepareEnoughContacts] + 244
7  libdispatch.dylib              0x18c2261bc _dispatch_client_callout + 16
8  libdispatch.dylib              0x18c2337f0 _dispatch_barrier_sync_f_invoke + 84
9  ContactsUI                     0x196b7a9ec -[CNContactStoreDataSource _reloadSynchronously:] + 180
10 ContactsUI                     0x196b7af5c -[CNContactStoreDataSource currentSnapshot] + 64
11 ContactsUI                     0x196b79b80 -[CNContactStoreDataSource contacts] + 24
12 ContactsUI                     0x196b2045c -[CNContactListViewController _updateCountStringNow:] + 68
13 ContactsUI                     0x196b1f210 -[CNContactListViewController loadView] + 408
14 UIKit                          0x1932525bc -[UIViewController loadViewIfRequired] + 184
15 UIKit                          0x19330c2bc -[UINavigationController _layoutViewController:] + 72
16 UIKit                          0x19330c194 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 416
17 UIKit                          0x19330b4dc -[UINavigationController _startTransition:fromViewController:toViewController:] + 140
18 UIKit                          0x19330af28 -[UINavigationController _startDeferredTransitionIfNeeded:] + 856
19 UIKit                          0x19330aadc -[UINavigationController __viewWillLayoutSubviews] + 64
20 UIKit                          0x19330aa40 -[UILayoutContainerView layoutSubviews] + 188
21 UIKit                          0x1934e3fdc _runAfterCACommitDeferredBlocks + 292
22 UIKit                          0x1934d5d50 _cleanUpAfterCAFlushAndRunDeferredBlocks + 560
23 UIKit                          0x1932450b4 _afterCACommitHandler + 168
24 CoreFoundation                 0x18d34a0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
25 CoreFoundation                 0x18d347cf0 __CFRunLoopDoObservers + 372
26 CoreFoundation                 0x18d348180 __CFRunLoopRun + 1024
27 CoreFoundation                 0x18d2762b8 CFRunLoopRunSpecific + 444
28 GraphicsServices               0x18ed2a198 GSEventRunModal + 180
29 UIKit                          0x1932bd7fc -[UIApplication _run] + 684
30 UIKit                          0x1932b8534 UIApplicationMain + 208
31 MainApp                        0x1001365e8 main (main.m:16)
32 libdispatch.dylib              0x18c2595b8 (Missing)

It seems that com.apple.contacts.store is causing the crashing due to privacy policy after my research. Problem is I am not using contact store at all. This only occurred for one user.

like image 685
Weakman10122 Avatar asked Jan 26 '17 20:01

Weakman10122


1 Answers

If you use a UITextView with dataDetectorTypes enabled, the user can get via the force press touch gesture on a phone number into a context menu (provided by the system). From this menu a new contact can be created with this phone number, or the phone number can be added to an existing contact (see screenshot). Once the user taps on "Add To Contact" (Zu Kontakt hinzufügen), the application will try to request access to the address book. If you don't have NSContactsUsageDescription in your Info.plist, it will crash.

enter image description here

like image 123
plu Avatar answered Oct 14 '22 21:10

plu