Xcode16 Archive Error - Command SwiftCompile failed with a nonzero exit code

1.打包错误信息

Command SwiftCompile failed with a nonzero exit code

2.找到原因

It's because in Xcode 16, UITextField, they add a new function with the same name onReturn. It's ok when you compile and run, but will return error DeadArgSignatureOpt when archive.

The workaround is to change it to a different name (ex: onReturns)

(UITextField 新增了一个函数方法:onReturn;与三方库里面的onReturn函数方法冲突了,改下三方库里的名字即可,例如:onReturns)

3.解决

修改完打包,pass!

相关推荐
Lvan的前端笔记6 小时前
ios:版本号和Build构建号
ios
大熊猫侯佩8 小时前
WWDC26 全新 SwiftData 的 .codable 宏选项:它不是泛型专用胶水
数据库·swift·apple
smartpi_ai9 小时前
离线语音识别的“数字变量“限制:为什么不能识别“20.5度“?
人工智能·语音识别·xcode
大龄秃头程序员11 小时前
Swift 并发实战:从 Task 到 Actor 重入性,我掉进了“逻辑不一致”的坑
swift
阿童木写作12 小时前
Python批量翻译亚马逊商品图实战教程
开发语言·python·xcode
鹤卿12312 小时前
「iOS」3GShare总结
macos·ios·objective-c·cocoa
LinXunFeng12 小时前
给 Flutter 插件加上 Swift Package Manager 支持
flutter·swift
Lvan的前端笔记13 小时前
ios:区分 App Store / Ad Hoc / Development
ios
Lvan的前端笔记15 小时前
ios:证书配置
ios
大龄秃头程序员17 小时前
Swift 面试反直觉:Property Wrapper 真的拿不到宿主 self 吗?
swift