React Native TVOS升级后上传IPA至Transporter遇MinimumOSVersion缺失问题
解决React Native TVOS 0.71.11升级后Hermes.framework缺少MinimumOSVersion导致的Transporter上传错误(90360)
以下是几个经过验证的解决方案,按优先级尝试:
1. 通过Podfile脚本自动注入MinimumOSVersion
手动修改Info.plist容易被pod install覆盖,建议在Podfile中添加post_install脚本,每次安装依赖后自动给Hermes框架的Info.plist添加该键值:
post_install do |installer| installer.pods_project.targets.each do |target| if target.name == 'hermes-engine' # 定位Hermes框架的Info.plist路径 hermes_framework_path = target.product_reference.real_path info_plist_path = File.join(hermes_framework_path, 'Info.plist') if File.exist?(info_plist_path) # 替换为你的App最低支持的tvOS版本(比如15.0) system("defaults write #{info_plist_path} MinimumOSVersion '15.0'") end end end end
添加后执行pod install,再重新打包上传。
2. 确保项目与Pod的最低版本一致
检查Podfile开头的tvOS平台版本设置,确保和你的App target的Deployment Target一致:
# Podfile顶部设置 platform :tvos, '15.0' # 替换为你的App实际最低支持版本
同时在Xcode中确认你的App-tvOS target的Deployment Target也设置为相同版本,版本不匹配可能导致Hermes生成的Info.plist缺失该字段。
3. 彻底清理缓存后重新构建
缓存残留可能导致旧的Info.plist被重复使用,执行以下命令彻底清理后重新打包:
# 清理Node依赖和Pod缓存 rm -rf node_modules rm Podfile.lock pod deintegrate # 重新安装依赖 npm install pod install # 清理Xcode缓存并重新归档 xcodebuild clean -workspace YourApp.xcworkspace -scheme YourApp-tvOS xcodebuild archive -workspace YourApp.xcworkspace -scheme YourApp-tvOS -archivePath ./build/YourApp.xcarchive
注意替换YourApp为你的项目名称和对应scheme。
4. 手动修改Hermes Pod的Info.plist模板
如果以上方法无效,直接修改Pods目录中的Hermes框架Info.plist:
- 找到路径:
Pods/hermes-engine/destroot/Library/Frameworks/hermes.framework/Info.plist - 打开该文件,添加以下键值对:
<key>MinimumOSVersion</key> <string>15.0</string> <!-- 替换为你的tvOS最低版本 -->
- 保存后执行
pod install,确保修改被应用到最终构建产物中。
内容的提问来源于stack exchange,提问作者Mansi Laad
相关产品推荐
相关产品推荐

