gpt4 book ai didi

ios - Foobar-umbrella.h 是做什么用的?

转载 作者:搜寻专家 更新时间:2023-10-31 23:02:18 25 4
gpt4 key购买 nike

假设我有一个名为 Foobar 的框架。当我尝试编译我的 iOS 项目时,我收到编译器警告:

Umbrella header for module 'Foobar' does not include header 'Foobar-umbrella.h'

我不明白这个“Foobar-umbrella.h”是什么以及为什么不包含它。关于我的项目的一些细节:

  • 主要使用 Swift 编写的 iOS 8 应用项目。一点 Objective-C
  • “Foobar”框架是一个主要用 Swift 编写的独立项目,我将其作为子项目包含在我的主项目中。
  • 它已通过将其嵌入构建阶段并依赖于它而包含在内。但我没有明确链接反对它。
  • 我使用 Cocoapods,但“Foobar”不作为 pod。

最佳答案

伞形 header 是框架的“主” header 文件。它的用途是你可以这样写

#import <UIKit/UIKit.h>

代替

#import <UIKit/UIViewController.h>
#import <UIKit/UILabel.h>

#import <UIKit/UIButton.h>
#import <UIKit/UIDatePicker.h>

等等。

对我来说,<XCTest/XCTestCase+AsynchronousTesting.h>包含在 <XCTest/XCTest.h> 中.也许它不适合你?在这种情况下,添加

#import <XCTest/XCTestCase+AsynchronousTesting.h>

手动。

关于ios - Foobar-umbrella.h 是做什么用的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32202218/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com