最近升級了Xcode8.0,真是很多坑啊,填完1個來另外1個,今天又遇到了1個,用Xcode8.0上傳項目時被駁回說是info.plist里面沒有設置NSPhotoLibraryUsageDescription、NSCameraUsageDescription、NSContactsUsageDescription、NSMicrophoneUsageDescription等字段,之前這些都是預設的不用加,現在強迫了,真是愁悶,下面貼上解決方案
被駁回的緣由:
This app attempts to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
This app attempts to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.
大概意思就是得在plist里面必須加上NSPhotoLibraryUsageDescription和NSCameraUsageDescription的鍵值對才行,之前都是默許的,現在必須加,要不不讓通過,真是坑啊~~具體配置以下圖:
大概統計了1下需要加的1些字段列在下面:
NSContactsUsageDescription -> 通訊錄
NSMicrophoneUsageDescription -> 麥克風
NSPhotoLibraryUsageDescription -> 相冊
NSCameraUsageDescription -> 相機
NSLocationAlwaysUsageDescription -> 地理位置
NSLocationWhenInUseUsageDescription -> 地理位置
大概就是以上的1些字段,寫1篇博客總結1下,方便以后用到的時候能找到,如果大家有補充的可以告知我1下,謝謝大家的瀏覽