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!

相关推荐
报错小能手1 小时前
Swift EventBus讲解
开发语言·ios·swift
四眼蒙面侠2 小时前
Open Agent SDK (Swift):用原生 Swift 构建 AI Agent 应用
swift·agentsdk
报错小能手3 小时前
Swift UI 用 MVVM 架构 Combine EventBus 实现待办清单
开发语言·ui·swift
HiDev_4 小时前
iOS 蓝牙开发进阶:彻底理解 CBManager(状态、权限与正确使用方式)
ios·objective-c·蓝牙·ble
文件夹__iOS19 小时前
SwiftUI 核心选型:class + ObservableObject VS struct + @State
ios·swiftui·swift
SameX1 天前
独立开发了一款健康记录 App,聊聊几个让我纠结很久的设计决策
ios
报错小能手1 天前
Swift UI 框架 实战 简易计数器、待办清单 、随机壁纸图库、个人笔记
ui·ios
游戏开发爱好者81 天前
深入理解iOSTime Profiler:提升iOS应用性能的关键工具
android·ios·小程序·https·uni-app·iphone·webview
for_ever_love__2 天前
UI学习:多界面传值的正向传值(属性传值)和反向传值(代理传值)
学习·ui·ios·objective-c
开心就好20252 天前
全面介绍iOS开发工具:Xcode、AppCode、CocoaPods、Fastlane和Git
后端·ios