Flutter应用遭App Store拒绝:OrderedSet.framework缺失隐私清单求助
App Store提交被拒(ITMS-91061)解决方案
拒绝错误信息
ITMS-91061: Missing privacy manifest - Your app includes “Frameworks/OrderedSet.framework/OrderedSet”, which includes OrderedSet, 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: https://developer.apple.com/support/third-party-SDK-requirements.
已尝试操作
- 确认
OrderedSet.framework由flutter_inappwebview_ios间接引入,未在pubspec.yaml中显式声明 - 在项目根目录添加通用隐私清单
PrivacyInfo.xcprivacy,问题未解决 - 因Dart版本限制,无法升级
flutter_inappwebview至6.1.5版本
隐私清单文件

Flutter Doctor信息
- Flutter (Channel stable, 3.22.3, on Microsoft Windows [Version 10.0.19045.5487], locale en-AE) - Windows Version (Installed version of Windows is version 10 or higher) - Android toolchain - develop for Android devices (Android SDK version 35.0.0) - Chrome - develop for the web - Visual Studio - develop Windows apps (Visual Studio Community 2022 17.5.2) - Android Studio (version 2024.1) - VS Code (version 1.96.4) - Connected device (3 available) - Network resources
我的问题
- 如何手动为OrderedSet.framework添加隐私清单以符合苹果新政策?
- 是否可以修改flutter_inappwebview_ios或覆盖其依赖以添加隐私清单?
- 若无法升级flutter_inappwebview,是否有其他替代解决方案?
解决方案
1. 手动为OrderedSet.framework添加隐私清单
按以下步骤操作:
- 定位到项目中
ios/Pods/OrderedSet目录 - 创建
PrivacyInfo.xcprivacy文件,填入符合苹果要求的内容(OrderedSet为纯数据结构库,无隐私收集行为,示例内容如下):
<?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/> <key>NSPrivacyCollectedDataTypes</key> <array/> </dict> </plist>
- 打开
OrderedSet.podspec文件,添加资源引用:找到s.resources字段,将'PrivacyInfo.xcprivacy'加入;若该字段不存在,直接新增s.resources = ['PrivacyInfo.xcprivacy'] - 执行
cd ios && pod install,重新打包提交App Store
2. 修改flutter_inappwebview_ios依赖或自动覆盖配置
使用CocoaPods的post_install钩子实现自动配置,避免每次pod install重复手动修改:
在ios/Podfile末尾添加以下代码:
post_install do |installer| # 自动生成OrderedSet的隐私清单 ordered_set_dir = installer.pods_project.path + 'OrderedSet' privacy_file = ordered_set_dir + 'PrivacyInfo.xcprivacy' unless privacy_file.exist? privacy_file.write <<~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/> <key>NSPrivacyCollectedDataTypes</key> <array/> </dict> </plist> XML end # 将隐私清单添加到OrderedSet的构建资源中 installer.pods_project.targets.each do |target| if target.name == 'OrderedSet' target.add_resource('PrivacyInfo.xcprivacy') end end end
执行cd ios && pod install后,CocoaPods会自动生成并配置隐私清单,无需手动修改依赖。
3. 无法升级flutter_inappwebview的替代方案
- 强制指定OrderedSet新版本:在
ios/Podfile中添加pod 'OrderedSet', '~> 5.0.0'(确认该版本包含隐私清单),执行cd ios && pod update OrderedSet,强制拉取带隐私清单的版本 - 手动集成OrderedSet:下载OrderedSet源码,添加隐私清单后编译成framework,将其放入项目
ios/Frameworks目录,然后在Podfile中替换依赖:pod 'OrderedSet', :path => './Frameworks/OrderedSet.framework' - 替换WebView插件:改用官方
webview_flutter插件,该插件不依赖OrderedSet,可规避此问题
内容的提问来源于stack exchange,提问作者Jamal Ahmad
相关产品推荐
相关产品推荐

