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

相关推荐
YF02119 小时前
Flutter 编译卡顿解决方案
android·flutter·ios
空中海10 小时前
第十一章:iOS性能优化、测试与发布
ios·性能优化
iAnMccc11 小时前
Swift Codable 的 5 个生产环境陷阱,以及如何优雅地解决它们
ios
visual_zhang11 小时前
Swift 方法派发机制深度解析 —— 兼与 Objective-C `objc_msgSend` 对比
objective-c·swift
iAnMccc11 小时前
从 HandyJSON 迁移到 SmartCodable:我们团队的实践
ios
kerli12 小时前
基于 kmp/cmp 的跨平台图片加载方案 - 适配 Android View/Compose/ios
android·前端·ios
懋学的前端攻城狮14 小时前
第三方SDK集成沉思录:在便捷与可控间寻找平衡
ios·前端框架
用户794572239541317 小时前
【SwiftyJSON】拯救你的 as? [String: Any]——链式 JSON 访问的正确姿势
swiftui·objective-c·swift
冰凌时空17 小时前
Swift vs Objective-C:语言设计哲学的全面对比
ios·openai
用户794572239541317 小时前
【Moya】为什么你的 Alamofire 代码需要再封装一层?
swiftui·objective-c·swift