1:首先創(chuàng)建InfoPlist.strings文件(創(chuàng)建過(guò)程就不多少了不从,網(wǎng)上一搜有好多);
2:創(chuàng)建完成后洗鸵,去到info.plist文件中點(diǎn)擊空白處幢痘,右擊并選擇:Raw Key&Values? 顯示對(duì)應(yīng)的key瀑踢;如:Privacy - Photo Library Usage Description————》NSPhotoLibraryUsageDescription;
3:把NSPhotoLibraryUsageDescription拷貝到InfoPlist.strings作為Key,分別在不同的多語(yǔ)言上添加對(duì)應(yīng)的value即可辨宠。
如:
<key>NSAppleMusicUsageDescription</key>
<string>NSAppleMusicUsageDescription</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>NSBluetoothAlwaysUsageDescription</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>NSBluetoothPeripheralUsageDescription</string>
<key>NSCalendarsUsageDescription</key>
<string>NSCalendarsUsageDescription</string>
<key>NSCameraUsageDescription</key>
<string>NSCameraUsageDescription</string>
<key>NSContactsUsageDescription</key>
<string>NSContactsUsageDescription</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>NSLocationAlwaysUsageDescription</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>NSLocationWhenInUseUsageDescription</string>
<key>NSMicrophoneUsageDescription</key>
<string>NSMicrophoneUsageDescription</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>NSPhotoLibraryUsageDescription</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>NSSpeechRecognitionUsageDescription</string>
? ? <key>NSPhotoLibraryAddUsageDescription</key>
? ? <string>NSPhotoLibraryAddUsageDescription</string>
<key>UIBackgroundModes</key>
<array>
<string>bluetooth-central</string>
<string>remote-notification</string>
</array>
EN:
NSBluetoothAlwaysUsageDescription = "App needs your permission to allow Bluetooth to communicate with device";
NSBluetoothPeripheralUsageDescription ="App needs your permission to allow Bluetooth to communicate with device";
NSCalendarsUsageDescription ="App needs your permission to access calendar";
NSCameraUsageDescription ="App needs your permission to use camera function";
NSContactsUsageDescription ="App needs your permission to access your address book";
NSLocationAlwaysUsageDescription ="App needs your consent to enable location function all the time";
NSLocationWhenInUseUsageDescription ="App needs your consent to enable location function all the time";
NSMicrophoneUsageDescription ="App requires your consent to record";
NSPhotoLibraryAddUsageDescription ="App needs your permission to save photos to album";
NSPhotoLibraryUsageDescription ="App needs your permission to access the album";
NSSpeechRecognitionUsageDescription ="App needs your consent to use speech recognition";
NSAppleMusicUsageDescription = "App needs your permission to access multimedia";
CN:
NSBluetoothAlwaysUsageDescription = "APP需要您的允許才能允許藍(lán)牙與設(shè)備通信";
NSBluetoothPeripheralUsageDescription ="APP需要您的允許才能允許藍(lán)牙與設(shè)備通信";
NSCalendarsUsageDescription ="APP需要您的允許才能訪問(wèn)日歷";
NSCameraUsageDescription ="APP需要您的允許才能使用照相機(jī)功能";
NSContactsUsageDescription ="APP需要您的允許才能訪問(wèn)您的通訊簿";
NSLocationAlwaysUsageDescription ="APP需要您的允許才能始終啟用位置功能 ";
NSLocationWhenInUseUsageDescription ="APP需要您的允許才能始終啟用位置功能 ";
NSMicrophoneUsageDescription ="APP需要您的允許才能錄制";
NSPhotoLibraryAddUsageDescription ="APP需要您的允許才能將照片保存到相冊(cè) ";
NSPhotoLibraryUsageDescription ="APP需要您的允許才能訪問(wèn)相冊(cè)";
NSSpeechRecognitionUsageDescription ="APP需要您的允許才能使用語(yǔ)音識(shí)別";
NSAppleMusicUsageDescription = "APP需要你的允許才能訪問(wèn)多媒體";