1:首先创建InfoPlist.strings文件(创建过程就不多少了,网上一搜有好多);
2:创建完成后,去到info.plist文件中点击空白处,右击并选择:Raw Key&Values 显示对应的key;如:Privacy - Photo Library Usage Description————》NSPhotoLibraryUsageDescription;
3:把NSPhotoLibraryUsageDescription拷贝到InfoPlist.strings作为Key,分别在不同的多语言上添加对应的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>
以下为本人APP的提示: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需要您的允许才能允许蓝牙与设备通信";
NSBluetoothPeripheralUsageDescription ="APP需要您的允许才能允许蓝牙与设备通信";
NSCalendarsUsageDescription ="APP需要您的允许才能访问日历";
NSCameraUsageDescription ="APP需要您的允许才能使用照相机功能";
NSContactsUsageDescription ="APP需要您的允许才能访问您的通讯簿";
NSLocationAlwaysUsageDescription ="APP需要您的允许才能始终启用位置功能 ";
NSLocationWhenInUseUsageDescription ="APP需要您的允许才能始终启用位置功能 ";
NSMicrophoneUsageDescription ="APP需要您的允许才能录制";
NSPhotoLibraryAddUsageDescription ="APP需要您的允许才能将照片保存到相册 ";
NSPhotoLibraryUsageDescription ="APP需要您的允许才能访问相册";
NSSpeechRecognitionUsageDescription ="APP需要您的允许才能使用语音识别";
NSAppleMusicUsageDescription = "APP需要你的允许才能访问多媒体";
网友评论