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

相关推荐
Sylvan Ding18 小时前
VSCode插件推荐 2025 - 拥抱 Agentic Coding 时代:是时候从 PyCharm 切换到 VSCode 生态了!
ide·vscode·pycharm·extension·插件·agentic·氛围编程
00后程序员张19 小时前
iOS混淆与IPA文件加固全流程实战 防止苹果应用被反编译的工程级方案
android·ios·小程序·https·uni-app·iphone·webview
胖虎119 小时前
iOS 推送证书 P8 介绍及生成流程
ios·个推·p8证书·极光推送·ios推送
白熊18820 小时前
【图像大模型】ms-swift 深度解析:一站式多模态大模型微调与部署框架的全流程使用指南
开发语言·ios·swift
2501_9151063220 小时前
iOS 应用加固与苹果软件混淆指南,如何防止 IPA 被反编译与二次打包?
android·ios·小程序·https·uni-app·iphone·webview
用户347475478332821 小时前
把SwiftUI View 转为图片
ios·swiftui
高山上有一只小老虎21 小时前
idea2025社区版设置打开的多个文件展示在工具栏下方
java·ide·intellij-idea
mit6.8241 天前
[FSCalendar] 可定制的iOS日历组件 | docs | Interface Builder
ios
深圳行云创新1 天前
Cloud IDE vs 本地IDE:AI编程时代的“降维打击“
ide·ai编程
2501_915921431 天前
iOS 应用加固与苹果软件混淆全解析 IPA 文件防反编译、混淆加密与无源码加固策略
android·macos·ios·小程序·uni-app·cocoa·iphone