uniapp配置Info.plist文件

在根目录新建info.plist文件

根据应用需求编辑添加需要的内容,代码如下:



" target="_blank">http://www.apple.com/DTDs/PropertyList-1.0.dtd%22%3E





My_Custom_String_Key

My_Custom_String_Value

My_Custom_Array_Key





My_Custom_Array_Item_Key

My_Custom_Array_Item_Value

My_Custom_Array_Item_Key2

My_Custom_Array_Item_Value2









文件说明:

plist文件必须符合标准的xml格式

plist文件必须符合Apple Information Property List规范,文件头需加" target="_blank">http://www.apple.com/DTDs/PropertyList-1.0.dtd%22%3E

根节点必须是plist,二级节点必须是dict

Info.plist的内容和manifest.json的内容应避免冲突,即不配置manifest中已经配置过的内容。云端打包时会合并到app中的Info.list文件,出现冲突时Info.plist的内容会覆盖manifest.json中配置

如果应用需要配置隐私信息访问的许可描述,可如下所示:





" target="_blank">http://www.apple.com/DTDs/PropertyList-1.0.dtd%22%3E





NSPhotoLibraryUsageDescription

读取相册的许可描述

NSPhotoLibraryAddUsageDescription

读写相册的许可描述

NSCameraUsageDescription

使用摄像头的许可描述

NSMicrophoneUsageDescription

使用麦克风的许可描述

NSLocationWhenInUseUsageDescription

运行期访问位置信息的许可描述

NSLocationAlwaysUsageDescription

后台运行期访问位置信息的许可描述

NSLocationAlwaysAndWhenInUseUsageDescription

访问位置信息的许可描述

NSUserNotificationsUsageDescription

使用推送通知的许可描述

NSCalendarsUsageDescription

访问日历的许可描述

NSContactsUsageDescription

访问通讯录的许可描述

NSBluetoothPeripheralUsageDescription

使用蓝牙的许可描述

NSBluetoothAlwaysUsageDescription

持续使用蓝牙的许可描述

NSSpeechRecognitionUsageDescription

使用系统语音识别的许可描述

NSRemindersUsageDescription

访问提醒事项的许可描述

NSMotionUsageDescription

访问运动与健身的许可描述

NSHealthUpdateUsageDescription

更新健康数据的许可描述

NSHealthShareUsageDescription

分享健康数据的许可描述

NSAppleMusicUsageDescription

访问媒体资料库的许可描述

NFCReaderUsageDescription

使用NFC的许可描述

NSHealthClinicalHealthRecordsShareUsageDescription

访问临床记录信息的许可描述

NSHomeKitUsageDescription

访问HomeKit数据的许可描述

NSSiriUsageDescription

访问Siri的许可描述

NSFaceIDUsageDescription

使用FaceID的许可描述

NSLocalNetworkUsageDescription

使用本地网络的许可描述

NSUserTrackingUsageDescription

跟踪用户活动的许可描述





uni-app x项目manifest.json中没有提供iOS隐私信息访问许可描述的配置,需在此Info.plist中添加。

配置许可描述时需根据应用实际情况准确描述用途,否则提交AppStore审核可能被拒。

注意如果manifest.json中勾选了广告选项事,必须设置NSUserNotificationsUsageDescription,不配置此字段(不包含NSUserNotificationsUsageDescription)也可以通过AppStore审核;

如果配置了此字段则需正确描述应用使用消息通知的用途才能通过AppStore审核。

相关推荐

评论(0)
发表评论