uni-app 苹果打包显示ITMS-91053 Missing API declaration

uni-app 苹果打包显示ITMS-91053 Missing API declaration

操作步骤:

  • 打包后显示

预期结果:

  • 打包后显示

实际结果:

  • 打包后显示

bug描述:

  • 苹果上架信息显示这个

image

信息类别 详情
产品分类 uniapp/App
PC开发环境 Windows
PC开发环境版本 win11
HBuilderX类型 正式
HBuilderX版本 4.13
手机系统 iOS
手机系统版本 iOS 14
手机厂商 苹果
手机机型 苹果
页面类型 vue
vue版本 vue2
打包方式 云端
项目创建方式 HBuilderX

更多关于uni-app 苹果打包显示ITMS-91053 Missing API declaration的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

你是什么时候打包的,提供一下appid

更多关于uni-app 苹果打包显示ITMS-91053 Missing API declaration的实战教程也可以访问 https://www.itying.com/category-93-b0.html


在将 Uni-App 项目打包上传到苹果 App Store 时,如果遇到 ITMS-91053: Missing API declaration 的错误提示,通常是因为苹果要求开发者在使用某些 API 时,必须提供相应的隐私声明。特别是从 iOS 17 开始,苹果对隐私和数据收集的要求更加严格。

错误原因

ITMS-91053 错误通常是由于以下原因:

  1. 使用了需要声明的 API:苹果要求开发者在使用某些 API(如 NSPrivacyAccessedAPICategoryFileTimestampNSPrivacyAccessedAPICategorySystemBootTime 等)时,必须提供隐私声明。
  2. 缺少隐私声明:在 Info.plist 文件中没有正确声明这些 API 的使用目的。

解决方案

要解决这个问题,你需要按照以下步骤操作:

1. 检查使用的 API

首先,检查你的 Uni-App 项目中是否使用了需要声明的 API。常见的 API 包括:

  • NSPrivacyAccessedAPICategoryFileTimestamp
  • NSPrivacyAccessedAPICategorySystemBootTime
  • NSPrivacyAccessedAPICategoryDiskSpace
  • NSPrivacyAccessedAPICategoryActiveKeyboards
  • NSPrivacyAccessedAPICategoryUserDefaults

2. 在 Info.plist 中添加隐私声明

Info.plist 文件中,添加对应的隐私声明。以下是 Info.plist 中添加隐私声明的示例:

<key>NSPrivacyAccessedAPITypes</key>
<array>
    <dict>
        <key>NSPrivacyAccessedAPIType</key>
        <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
        <key>NSPrivacyAccessedAPITypeReasons</key>
        <array>
            <string>Used to verify the integrity of app data.</string>
        </array>
    </dict>
    <dict>
        <key>NSPrivacyAccessedAPIType</key>
        <string>NSPrivacyAccessedAPICategorySystemBootTime</string>
        <key>NSPrivacyAccessedAPITypeReasons</key>
        <array>
            <string>Used to calculate the time since the last system reboot.</string>
        </array>
    </dict>
</array>
回到顶部