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!

相关推荐
Swift社区9 小时前
Swift 实战:实现一个简化版的 Twitter(LeetCode 355)
leetcode·swift·twitter
HarderCoder9 小时前
当Swift Codable遇到缺失字段:优雅解决数据解码难题
swift
imLix12 小时前
RunLoop 实现原理
前端·ios
归辞...18 小时前
「iOS」————设计架构
ios·架构
i紸定i21 小时前
解决html-to-image在 ios 上dom里面的图片不显示出来
前端·ios·vue·html·html-to-image
YungFan1 天前
iOS26适配指南之UIButton
ios·swift
红橙Darren2 天前
手写操作系统 - 编译链接与运行
android·ios·客户端
鹏多多.2 天前
flutter-使用device_info_plus获取手机设备信息完整指南
android·前端·flutter·ios·数据分析·前端框架
麦兜*2 天前
【swift】SwiftUI动画卡顿全解:GeometryReader滥用检测与Canvas绘制替代方案
服务器·ios·swiftui·android studio·objective-c·ai编程·swift