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

相关推荐
追光天使20 小时前
Mac M1 源码安装FFmpeg,开启enable-gpl 和 lib x264
macos·ffmpeg
会飞的爱迪生1 天前
mac和linux传输文件
linux·运维·macos
数据的世界012 天前
解决.NET程序通过网盘传到Linux和macOS不能运行的问题
linux·运维·服务器·macos
wn5312 天前
【浏览器 - Mac实时调试iOS手机浏览器页面】
前端·macos·ios·智能手机·浏览器
shichen5012 天前
MacOS 如何映射快捷键
macos·mac·策略模式
小鹿撞出了脑震荡3 天前
Effective Objective-C 2.0 读书笔记—— 方法调配(method swizzling)
ios·objective-c·swift
小鹿撞出了脑震荡3 天前
Effective Objective-C 2.0 读书笔记—— 消息转发
ios·objective-c·swift
一丝晨光3 天前
Cocoa和Cocoa Touch是什么语言写成的?什么是Cocoa?编程语言中什么是框架?为什么苹果公司Cocoa类库有不少NS前缀?Swift编程语言?
macos·ios·objective-c·cocoa·swift·uikit·cocoa touch
程序媛-徐师姐4 天前
解决MacOS安装软件时提示“打不开xxx软件,因为Apple无法检查其是否包含恶意软件”的问题
macos·无法检查其是否包含恶意软件·打不开xxx软件
会飞的爱迪生4 天前
mac安装dockerdesktop优化
macos