目录

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

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!