Xcode8以后,我們必須在工程的plist文件中配置隱私權限,當然,我們根據App中的使用情況可以有很多種隱私配置方案,但是, 為了減少提交審核不成功的可能性,我建議將這8項全部都加進plist文件中:
我們可以在右擊Info.plist文件以源代碼方式打開,將以下代碼粘貼到字典最外一層即可:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>請允此App使用藍牙功能</string>
<key>NSCalendarsUsageDescription</key>
<string>請允許此App使用日歷</string>
<key>NSCameraUsageDescription</key>
<string>請允許此App使用您的相機功能</string>
<key>NSContactsUsageDescription</key>
<string>請允許此App訪問您的通訊錄</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>請允許此App獲取您的位置信息</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>請允許此App獲取您的位置信息</string>
<key>NSMicrophoneUsageDescription</key>
<string>請允許此App使用您的麥克風</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>請允許此App訪問您的圖庫</string>