2017-09-19 47 views
0

任何人都可以幫我解決這個錯誤嗎?更新至10.3後,iOS應用程序崩潰。不能添加照片

此應用程序已崩潰,因爲它試圖訪問隱私敏感的數據,沒有使用說明。該應用程序的Info.plist必須包含一個帶有字符串值的NSPhotoLibraryUsageDescription鍵,以向用戶解釋應用程序如何使用此數據。

基本上,我的應用程序可以在使用ios 9.3時運行,但是在我更新了我的ios之後。它轉向這個錯誤。

  • 我已經添加所有必要的密鑰到我info.plist

下面是我的info.plist

<key>CFBundleIcons</key> 
<string></string> 
<key>CFBundleIconFiles</key> 
<string></string> 
<key>CFBundleIconFile</key> 
<string></string> 
<key>CFBundlePackageType</key> 
<string></string> 
<key>NSPhotoLibraryAddUsageDescription</key> 
<string>${PRODUCT_NAME} CameraAdditional Usage</string> 
<key>NSCameraUsageDescription</key> 
<string>Allow users to add picture</string> 
<key>NSBluetoothPeripheralUsageDescription</key> 
<string>${PRODUCT_NAME} BluetoothPeripheral</string> 
<key>NSCalendarsUsageDescription</key> 
<string>${PRODUCT_NAME} Calendar Usage</string> 
<key>NSContactsUsageDescription</key> 
<string>${PRODUCT_NAME} Contact fetch</string> 
<key>NSHealthShareUsageDescription</key> 
<string>${PRODUCT_NAME} Health Description</string> 
<key>NSHealthUpdateUsageDescription</key> 
<string>${PRODUCT_NAME} Health Updates</string> 
<key>NSHomeKitUsageDescription</key> 
<string>${PRODUCT_NAME} HomeKit Usage</string> 
<key>NSLocationAlwaysUsageDescription</key> 
<string>${PRODUCT_NAME} Use location always</string> 
<key>NSLocationUsageDescription</key> 
<string>${PRODUCT_NAME} Location Updates</string> 
<key>NSLocationWhenInUseUsageDescription</key> 
<string>${PRODUCT_NAME} WhenInUse Location</string> 
<key>NSAppleMusicUsageDescription</key> 
<string>${PRODUCT_NAME} Music Usage</string> 
<key>NSMicrophoneUsageDescription</key> 
<string>${PRODUCT_NAME} Microphone Usage</string> 
<key>NSMotionUsageDescription</key> 
<string>${PRODUCT_NAME} Motion Usage</string> 
<key>kTCCServiceMediaLibrary</key> 
<string>${PRODUCT_NAME} MediaLibrary Usage</string> 
<key>NSPhotoLibraryUsageDescription</key> 
<string>Allow user to add picture from library</string> 
<key>NSRemindersUsageDescription</key> 
<string>${PRODUCT_NAME} Reminder Usage</string> 
<key>NSSiriUsageDescription</key> 
<string>${PRODUCT_NAME} Siri Usage</string> 
<key>NSSpeechRecognitionUsageDescription</key> 
<string>${PRODUCT_NAME} Speech Recognition Usage</string> 
<key>NSVideoSubscriberAccountUsageDescription</key> 
<string>${PRODUCT_NAME} Video Subscribe Usage</string> 
<key>NSHumanReadableCopyright</key> 
<string></string> 
<key>CFBundleGetInfoString</key> 
<string></string> 
<key>Privacy - Calendars Usage Description </key> 
<string>$(PRODUCT_NAME) calendar events</string> 
<key>CFBundleDisplayName</key> 
<string></string> 
<key>LSApplicationCategoryType</key> 
<string></string> 
<key>CFBundleDevelopmentRegion</key> 
<string>en</string> 
<key>CFBundleExecutable</key> 
<string>$(EXECUTABLE_NAME)</string> 
+1

此請提供碰撞數據 –

+0

燦請提供崩潰報告 –

+0

libsystem_kernel.dylib'__abort_with_payloa d: 0x11716b0a0 <+0>:movl $ 0x2000209,%eax; IMM = 0x2000209 0x11716b0a5 <+5>:MOVQ%RCX,%R 10 0x11716b0a8 <+8>:系統調用 - > 0x11716b0aa <+10>:宰0x11716b0b4; <+20> 0x11716b0ac <+12>:movq%rax,%rdi 0x11716b0af <+15>:jmp 0x117164caf; cerror_nocancel 0x11716b0b4 <+20>:retq 0x11716b0b5 <+21>:NOP 0x11716b0b6 <+22>:NOP 0x11716b0b7 <+23>:NOP –

回答

1

添加到info.plist中<key>NSPhotoLibraryUsageDescription</key> <string>Photo Library Access Warning</string>

相關問題