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名

相关推荐
代码搬运媛4 小时前
Jest 测试框架详解与实现指南
前端
counterxing5 小时前
我把 Codex 里的 Skills 做成了一个 MCP,还支持分享
前端·agent·ai编程
wangqiaowq5 小时前
windows下nginx的安装
linux·服务器·前端
之歆6 小时前
DAY_12JavaScript DOM 完全指南(二):实战与性能篇
开发语言·前端·javascript·ecmascript
发现一只大呆瓜6 小时前
Vite凭什么这么快?3分钟带你彻底搞懂 Vite 热更新的幕后黑手
前端·面试·vite
Maimai108086 小时前
React如何用 @microsoft/fetch-event-source 落地 SSE:比原生 EventSource 更灵活的实时推送方案
前端·javascript·react.js·microsoft·前端框架·reactjs·webassembly
kyriewen7 小时前
产品经理把PRD写成“天书”,我用AI半小时重写了一遍,他当场愣住
前端·ai编程·cursor
humcomm8 小时前
元框架的工作原理详解
前端·前端框架
canonical_entropy8 小时前
Attractor Before Harness: AI 大规模开发的方法论
前端·aigc·ai编程
zhangxingchao9 小时前
多 Agent 架构到底怎么选?从 Claude Agent Teams、Cognition/Devin 到工程落地原则
前端·人工智能·后端