libarclite_iphonesimulator.a‘; try increasing the minimum deployment target

  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 添加如下代码,指定目标版本:

复制代码
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

  1. pod 安装出现错误

! Could not automatically select an Xcode workspace. Specify one in your Podfile like so:

我这里遇到的是,podfile 里面有多个 target 的时候,需要指定 workspace

  1. 模拟器运行 出错

Could not find module 'xxxxxx' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator

需要设置 Excluded Architectures 添加模拟器 Any iOS Simulator SDK: arm64 即可

相关推荐
king13598745504 小时前
LFM2.5-24B-A2B Mac 本地部署:内存估算、GGUF/MLX 与 Python 预检脚本
人工智能·macos
骑着蜗牛撵大象3274 小时前
链路层不只是 MAC:以太网帧、ARP 与 802.1Q VLAN 的逐跳拆解
计算机网络·macos·ar·vlan·mac地址·链路层
茶底世界之下5 小时前
林间步道要不要加暗角?用 Awaking 把强度收在20%
前端·ios·图片资源
season_zhu5 小时前
Skills For Real Engineers 系列之一:先配好项目,再让 ask-matt 帮我选技能
ios·openai·ai编程
一条泥憨鱼6 小时前
【计算机网络】| 从 MAC 到 NAT 的跨网段通信全链路
服务器·网络·学习·计算机网络·macos
疯狂敲代码的老刘7 小时前
d2r-mobile:3.2千星开源暗黑破坏神2 iOS兼容层,3天冲上GitHub日榜
ios·github
黑科技iOS上架20 小时前
App Store5.6隐藏功能究竟怎么排查?
ios·审核
Yannik1 天前
iOS Swift Package Manager(SPM)私有组件完整实操
ios·swift
随遇丿而安1 天前
第 4 周:28KB 的 PNG 占了 8MB 内存,因为图片内存看尺寸不看文件大小
ios
leizhen198408091 天前
Vibe Coding:门槛降了,但判断力成了新的门槛
人工智能·安全·ios