You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Appollo生成Flutter iOS项目IPA文件失败报错求助

解决Flutter iOS构建IPA时的"Permission denied"及"IPA file not found"错误

问题根源

从构建日志可明确,归档失败的直接诱因是Pod脚本文件权限不足:

/Users/appollo/Library/Developer/Xcode/DerivedData/.../Script-DAF5D85F83E67F121E2D5545.sh: line 2: /Users/appollo/Documents/app/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh: Permission denied

最终出现的"Ipa collection - IPA file not found - Error code 95"是连锁问题——Xcode归档失败,未生成IPA文件导致。

解决步骤

  1. 修复Pod脚本文件权限
    进入项目的ios目录,执行命令为所有Pod相关脚本添加可执行权限:

    find ios/Pods -name "*.sh" -exec chmod +x {} \;
    

    也可单独指定关键脚本:

    chmod +x Pods/Target\ Support\ Files/Pods-Runner/Pods-Runner-frameworks.sh
    chmod +x Pods/Target\ Support\ Files/Pods-Runner/Pods-Runner-resources.sh
    
  2. 清理缓存并重新构建

    • 清理Flutter构建缓存:
      flutter clean
      
    • 重新集成并安装Pods:
      cd ios
      pod deintegrate
      pod install
      cd ..
      
    • 再次执行Appollo构建命令:
      appollo build start
      
  3. 额外检查(可选)

    • 确认Xcode项目中"Run Script"阶段的脚本路径无拼写错误
    • 若使用版本控制,确保.sh文件的可执行权限已被正确提交(避免拉取代码后权限丢失)

内容的提问来源于stack exchange,提问作者daphneyong11

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.19 11:52:08