iOS info.plist 常用字段字段介绍
字段 | 作用 | Property List Key |
---|---|---|
Localization native development region | 与本地化设置有关,为默认的开发语言 | CFBundleDevelopmentRegion |
Executable file | 程序安装包的名称 | CFBundleExecutable |
InfoDictionary version | 版本信息 | CFBundleInfoDictionaryVersion |
Bundle identifier | 软件唯一的标识,是根据公司的标识与项目名称自动生成的,在上传和测试的时候会用到 | CFBundleIdentifier |
Bundle name | App安装后显示的名称 | CFBundleName |
Bundle OS Type code | 用来标识软件包类型 | [CFBundlePackageType |
Bundle versions string, short | 发布的版本字符串 | CFBundleShortVersionString |
Bundle version | 应用程序版本号 | CFBundleVersion |
Application requires iPhone environment | 用于指示程序包是否只能运行在iPhone OS 系统上,默认为YES | LSRequiresIPhoneOS |
Launch screen interface file base name | 欢迎界面的文件名称 | UILaunchStoryboardName |
Main storyboard file base name | 默认情况下程序的主入口 | UIMainStoryboardFile |
Supported interface orientations | 设置程序默认支持的方向 | UISupportedInterfaceOrientations |
User Interface Style | 全局设置应用模式( Light(浅色模式)/Dark(黑色模式) ) | UIUserInterfaceStyle |
App Uses Non-Exempt Encryption | 一个布尔值,指示应用程序是否使用加密。 | ITSAppUsesNonExemptEncryption |
Application Scene Manifest | 有关应用程序基于场景的生命周期支持的信息。 | UIApplicationSceneManifest |
App Transport Security Settings | 描述对HTTP连接的默认安全性所做的更改。 | NSAppTransportSecurity |
iOS 常用权限
字段 | 作用 | Property List Key |
---|---|---|
Privacy - NFC Reader Usage Description | 申请NFC权限 | NFCReaderUsageDescription |
Privacy - Media Library Usage Description | 申请用户媒体库 | NSAppleMusicUsageDescription |
Privacy - Bluetooth Peripheral Usage Description | 申请蓝牙权限 | NSBluetoothPeripheralUsageDescription |
Privacy - Calendars Usage Description | 申请日历权限 | NSCalendarsUsageDescription |
Privacy - Camera Usage Description | 申请相机权限 | NSCameraUsageDescription |
Privacy - Contacts Usage Description | 申请通讯录权限 | NSContactsUsageDescription |
Privacy - Face ID Usage Description | 申请FaceID权限 | NSFaceIDUsageDescription |
Privacy - Health Share Usage Description | 申请用户健康数据权限 | NSHealthShareUsageDescription |
Privacy - Health Update Usage Description | 申请更改用户健康数据权限 | NSHealthUpdateUsageDescription |
Privacy - HomeKit Usage Description | 申请访问用户HomeKit配置数据 | NSHomeKitUsageDescription |
Privacy - Location Usage Description | iOS 8 后不再使用 | Use NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription instead |
Privacy - Location When In Use Usage Description | 申请前台运行或在使用时获取位置信息的权限 | NSLocationWhenInUseUsageDescription |
Privacy - Location Always Usage Description | 申请始终访问用户的位置信息 | NSLocationAlwaysUsageDescription |
Privacy - Microphone Usage Description | 申请麦克风权限 | NSMicrophoneUsageDescription |
Privacy - Motion Usage Description | 申请访问设备加速器权限 | NSMotionUsageDescription |
Privacy - Photo Library Additions Usage Description | 申请将图片保存到相册权限 | NSPhotoLibraryAddUsageDescription |
Privacy - Photo Library Usage Description | 申请访问相册权限 | NSPhotoLibraryUsageDescription |
在iOS代码中获取Info.plist中字段信息
//获取到info字典 可以根据上面的Property List Key去取值
let dic = Bundle.main.infoDictionary
//获取到info字典 可以根据上面的Property List Key去取值
NSDictionary *dic = [[NSBundle mainBundle]infoDictionary];
网友评论