Flutter开发HarmonyOS鸿蒙Next应用的时候3.7.12版本如何手动添加PrivacyInfo.xcprivacy文件

Flutter开发HarmonyOS鸿蒙Next应用的时候3.7.12版本如何手动添加PrivacyInfo.xcprivacy文件
【任务描述】 由于需要三端兼容,故只能使用flutter 3.7.12版本,最近发现编译打包后的ipa文件,提审后秒被拒,理由是

ITMS-91061: Missing privacy manifest - Your app includes “Frameworks/Flutter.framework/Flutter”, which includes Flutter, an SDK that was identified in the documentation as a commonly used third-party SDK. If a new app includes a commonly used third-party SDK, or an app update adds a new commonly used third-party SDK, the SDK must include a privacy manifest file. Please contact the provider of the SDK that includes this file to get an updated SDK version with a privacy manifest. For more details about this policy, including a list of SDKs that are required to include signatures and manifests, visit: 。。。。

其他三方库和主app,均在xcode工程中手动添加了PrivacyInfo.xcprivacy文件,并添加copy bundle resource解决了,但flutter库没有"copy bundle resource"(只有copy files试过了不行),不知道如何添加PrivacyInfo.xcprivacy文件

请问如何在flutter中添加PrivacyInfo.xcprivacy文件 ?


更多关于Flutter开发HarmonyOS鸿蒙Next应用的时候3.7.12版本如何手动添加PrivacyInfo.xcprivacy文件的实战教程也可以访问 https://www.itying.com/category-92-b0.html

2 回复

碰到同样问题,有解决吗?

更多关于Flutter开发HarmonyOS鸿蒙Next应用的时候3.7.12版本如何手动添加PrivacyInfo.xcprivacy文件的实战系列教程也可以访问 https://www.itying.com/category-92-b0.html


在使用 Flutter 开发 HarmonyOS 鸿蒙 Next 应用时,如果你需要手动添加 PrivacyInfo.xcprivacy 文件(通常是为了满足 App Store 的隐私要求),可以按照以下步骤进行操作:

1. 创建 PrivacyInfo.xcprivacy 文件

首先,你需要创建一个 PrivacyInfo.xcprivacy 文件。这个文件是一个 XML 文件,用于声明你的应用访问的用户隐私数据。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>NSPrivacyAccessedAPITypes</key>
    <array>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPITypeUserDefaults</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>We use UserDefaults to store user preferences.</string>
            </array>
        </dict>
    </array>
    <key>NSPrivacyCollectedDataTypes</key>
    <array>
        <dict>
            <key>NSPrivacyCollectedDataType</key>
            <string>NSPrivacyCollectedDataTypeName</string>
            <key>NSPrivacyCollectedDataTypeLinked</key>
            <true/>
            <key>NSPrivacyCollectedDataTypeTracking</key>
            <false/>
            <key>NSPrivacyCollectedDataTypePurposes</key>
            <array>
                <string>We collect your name to personalize your experience.</string>
            </array>
        </dict>
    </array>
</dict>
</plist>
回到顶部