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 即可

相关推荐
祎直向前1 小时前
vscode实现ssh远程连接
ide·vscode·ssh
yqsnjps74658ocz3 小时前
如何检查Visual Studio是否支持C++14?
c++·ide·visual studio
m0_495562784 小时前
Swift-GCD和NSOperation
ios·cocoa·swift
二流小码农5 小时前
鸿蒙开发:this的指向问题
android·ios·harmonyos
马拉萨的春天6 小时前
iOS的事件响应链
macos·ios·cocoa
猪哥帅过吴彦祖10 小时前
Flutter 系列教程:应用导航 - Navigator 1.0 与命名路由
android·flutter·ios
Justin_JGT10 小时前
vscode配置Claude Code(使用智谱API)
ide·vscode·编辑器
2501_9160088911 小时前
iOS 跨平台开发实战指南,从框架选择到开心上架(Appuploader)跨系统免 Mac 发布全流程解析
android·macos·ios·小程序·uni-app·iphone·webview
知兀11 小时前
IDEA的Code Style配置(使用google的Java Code Stytle)
java·ide·intellij-idea
鹏多多12 小时前
flutter图片选择库multi_image_picker_plus和image_picker的对比和使用解析
android·flutter·ios