1.创建InfoPlist.string文件,选择想要本地化的语言

注:文件名必须这样创建

如图:

2、选择想要本地化的权限

例如:

/*中文权限声明*/

NSBluetoothPeripheralUsageDescription = "是否允许此App使用蓝牙";

NSCalendarsUsageDescription = "是否允许此App使用日历?";

NSCameraUsageDescription = "是否允许此App使用相机?";

NSContactsUsageDescription = "是否允许此App访问你的通讯录?";

NSFaceIDUsageDescription = "是否允许此App使用你的Face ID?";

NSLocationAlwaysUsageDescription = "我们需要通过您的地理位置信息获取您周边的相关数据";

NSLocationWhenInUseUsageDescription = "我们需要通过您的地理位置信息获取您周边的相关数据";

NSMicrophoneUsageDescription = "是否允许此App使用你的麦克风?";

NSPhotoLibraryUsageDescription = "是否允许此App访问你的相册?";

NSSpeechRecognitionUsageDescription = "是否允许此App使用语音识别";

/*英文权限声明*/

NSBluetoothPeripheralUsageDescription = "Whether to allow this app to use Bluetooth?";

NSCalendarsUsageDescription = "Do you allow this app to use a calendar?";

NSCameraUsageDescription = "Is this app allowed to use the camera?";

NSContactsUsageDescription = "Do you allow this app to access your contacts?";

NSFaceIDUsageDescription = "Do you allow this app to use your Face ID?";

NSLocationAlwaysUsageDescription = "We need to get relevant data from your location through your location information.";

NSLocationWhenInUseUsageDescription = "We need to get relevant data from your location through your location information.";

NSMicrophoneUsageDescription = "Do you allow this app to use your microphone?";

NSPhotoLibraryUsageDescription = "Do you allow this app to access your photo album?";

NSSpeechRecognitionUsageDescription = "Whether to allow this app to use speech recognition?";

 

想要查询自己权限所对应的如图所做

左边的Key即为权限所以对应的key

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐