,objective-c,swift,xcode12"/>

首页 > 解决方案 > Xcode 12 错误:错误:找不到“SVProgressHUD/SVProgressHUD.h”文件#import

问题描述

从 App Store 升级到 Xcode 12 后,项目无法构建,我得到错误:

error: 'SVProgressHUD/SVProgressHUD.h' file not found #import <SVProgressHUD/SVProgressHUD.h>

Showing Recent Messages
Failed to emit precompiled header '/Users/mohammedrezk/Library/Developer/Xcode/DerivedData/APPNAME-bxzcdxjpyvptvrdegichefojwviu/Build/Intermediates.noindex/PrecompiledHeaders/APPNAME-Bridging-Header-swift_2E6RO3XQ4PJKS-clang_AGVOYNG8YIID.pch' for bridging header '~/APPNAME-Bridging-Header.h'

我搜索了很多 XCode 12 的问题,并将 Cocoa Pods 更新到 1.10。因为我找到了一些与 Xcode 12 和 CocoaPods 的 Umbrella Header 问题相关的答案,但仍然存在问题并且无法构建和运行项目

请问这个有什么解决办法吗?

标签: objective-cswiftxcode12

解决方案


纠结了好几天,终于找到了答案。Xcode12 默认设置了 Architectures $(ARCHS_STANDARD)。如果你选择 Any iOS Device or your iPhone,而不是模拟器,问题就消失了。关于 Architectures 设置,你可以看到Xcode 12 ,为 iOS 模拟器构建,但在为 iOS 构建的目标文件中链接,用于架构 arm64


推荐阅读