App crashes with __CRASHING_DUE_TO_PRIVACY_VIOLATION__ when trying to access contacts

前端 未结 7 1512
陌清茗
陌清茗 2020-12-16 09:15

Upon updating to iOS 10, when trying to access the contacts through plugin cordova-plugin-contacts v2.2.0, the app exits with

__CRASHING_DUE_TO_PRIVACY_VIOLAT

7条回答
  •  天涯浪人
    2020-12-16 09:43

    My Info.plist was missing NSPhotoLibraryAddUsageDescription. There are now TWO permissions associated with the photo library (starting iOS 11):

    • NSPhotoLibraryUsageDescription - to access the photo library
    • NSPhotoLibraryAddUsageDescription - write only permission to photo library

    I had the first permission prior to iOS 11 when it was the only key needed to use the photo library. Apparently in iOS 11 they added the second and made it required to add photos to the library. So if you support iOS 10 but don't include the second key, you will crash on iOS 11.

    All Keys are Here

提交回复
热议问题