Xcode 常见错误

1. Xcode 15 编译出现以下错误

clang: error: SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target

从错误信息来看,是指定的文件夹缺失文件导致的,Xcode 14.3 之后已经移除了这个文件。如果 Cocoapod 工程的 iOS 的部署目标 (iOS deployment target) 版本设置为大于等于 13.0,则不会出现这个错误。

综上解决办法有两种:

一是把工程的目标版本都设置为 iOS 13.0,包括 Cocoapod 工程。如果之后更新依赖,则需重新设置。通过设置所有 Cocoapod 的目标版本,或者在 podfile 添加如下代码,指定目标版本:

bash 复制代码
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
  end
end

二是从旧的 Xcode 安装目录下复制一份 arc 文件夹到错误中显示的目录中。Github 上也有该文件GitHub - kamyarelyasi/Libarclite-Files: Missing files in Xcode 14.3

2. pod 安装出现错误

!\] Could not automatically select an Xcode workspace. Specify one in your Podfile like so: 我这里遇到的是,podfile 里面有多个 target 的时候,需要指定 workspace ### 3. 模拟器运行 出错 Could not find module 'xxxxxx' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator 需要设置 Excluded Architectures 添加模拟器 Any iOS Simulator SDK: arm64 即可

相关推荐
迷路爸爸1806 小时前
VSCode / Cursor 中 LaTeX Workshop 的 settings.json 配置:编译与 SyncTeX 跳转
ide·vscode·json·latex
Lhan.zzZ13 小时前
笔记_2026.4.28_004
c++·ide·笔记·qt
空中海1 天前
iOS 动态分析、抓包与 Frida Hook
ios·职场和发展·蓝桥杯
一帘忧梦1 天前
vscode 搭建stm32开发环境 +HAL 库
ide·vscode·编辑器
空中海1 天前
iOS 静态逆向、IPA 结构与 Mach-O 分析
ios·华为·harmonyos
Mr -老鬼1 天前
EasyClick 双端自动化智能体|Android&iOS 全平台 EC 脚本开发助手
android·ios·自动化·易点云测·#easyclick·#ios自动化
空中海1 天前
01. iOS 逆向基础、环境搭建与授权
macos·ios·cocoa
空中海1 天前
iOS LLDB 调试、Mach-O、Runtime 与二进制分析
macos·ios·cocoa
空中海1 天前
iOS 防护、加固复测与综合交付
macos·ios·cocoa
独隅2 天前
Visual Studio 2026 详细安装教程和配置指南
ide·visual studio