Command SwiftCompile failed with a nonzero exit code Command SwiftGeneratePch em

Command SwiftCompile failed with a nonzero exit code Command SwiftGeneratePch emitted errors but did not return a nonzero exit code to indicate failure Command PrecompileSwiftBridgingHeader emitted errors but did not return a nonzero exit code to indicate failure

背景是xcode16.2 HandyJSON库不维护了 用了三步解决以上问题,

第一步 原文路径

升级Xcode15后 打包报错 xxx Command SwiftCompile failed with a nonzero exit code

解决办法: 选中pod 报错的库 Code Generation->Compilation Mode改成和debug一样的 Incremental。

第二步 原文路径

Xcode编译时报错"Command CompileSwiftSources failed with a nonzero exit code"。

应该是项目中的Socket.IO-Client-Swift这个pod导致的。

解决方案:

在Build Setting里添加一条user-defined

属性为SWIFT_ENABLE_BATCH_MODE,值为NO

Xcode编译时报错"Command CompileSwiftSources failed with a nonzero exit code"。

应该是项目中的Socket.IO-Client-Swift这个pod导致的。

解决方案:

在Build Setting里添加一条user-defined

属性为SWIFT_ENABLE_BATCH_MODE,值为NO

第三步

由于我自己维护HandyJSON库,见了一个abcHandyJSON.kit库,代码报错提示找不到 /Users/xx/Library/Developer/Xcode/DerivedData/项目名-bqphxvnehmbicihernwajnvfgqwr/Build/Products/Debug-iphoneos/HandyJSON/HandyJSON.modulemap

搜索other swift flag

中的HandyJSON替换成自己的abcHandyJSON名

相关推荐
古茗前端团队1 小时前
急招!前端|测试|后端|产品(名额多,速来)
前端·后端·架构
Lsx_2 小时前
不只是 Prompt:用 Superpowers Skill 给 AI 编程装上工程化工作流
前端·ai编程·claude
小碗细面2 小时前
前端 Prompt 工程实战:如何搭建场景化 Prompt 库
前端·ai编程
阿瑞IT2 小时前
2026年 AI Agent 生产化落地全景:四大高频故障根因分析与工程解法
前端
木木剑光2 小时前
我开源了一个 React 组件库,沉淀了多个高频组件和实用 Hooks
前端·javascript·react.js
kyriewen2 小时前
DeepSeek API 高峰时段涨价 2 倍,便宜大碗的时代要结束了?
前端·ai编程·deepseek
Moment2 小时前
牛逼,NextJs 从 16.3 开始全面拥抱 Agent Native 🥰🥰🥰
前端·后端·面试
沸点小助手3 小时前
6月沸点活动获奖名单公示|本周互动话题上新🎊
前端·后端
Csvn3 小时前
React 19 `use()` 来了:以后数据加载可以不用 useEffect?
前端·react.js
没落英雄3 小时前
从零开始搭建一个 AI Agent —— LangChain + TypeScript 实战手记
前端·人工智能·架构