没有找到目标的伞头 [英] no umbrella header found for target
问题描述
有关于堆栈溢出的答案,但没有一个对我有用.
There are answers on the stack overflow but none of them are working for me.
这是一个 Swift 2.0 项目,我使用的是 Xcode 7.2.1
It's a Swift 2.0 project and I'm using Xcode 7.2.1
重现问题的步骤
- 创建单一视图项目
- 转到项目导航器中的目标
- 添加一个名为 Common 的框架模块
- 添加另一个名为 Logger 的框架模块
- 编译
您会看到警告.
警告:未找到目标Logger"的伞头,将不会生成模块映射
请指教
测试项目链接 -> https://www.dropbox.com/s/cvgjls70ielnriy/Test.zip?dl=0
推荐答案
所以我了解了构建阶段和 Logger 的标题下,我在它的公共接口中添加了 logger.h.
so I learned about build phases and under header for Logger, i added logger.h in it's public interfaces.
这是一个错误还是我不知道 Xcode 没有自动为第三个目标/模块添加任何标头,它确实为第二个目标/模块添加了.
Is it a bug or I don't know that Xcode didn't add any headers for the 3rd target/module automatically, it did add for the second one.
我为测试添加了另一个目标并且包含了头文件,所以如果你添加第三个目标/模块(框架),就会出现这个问题.
I added another target just for the test and header file is included, so this problem happens if you add a 3rd target/module (framework).
希望对某人有所帮助.
这篇关于没有找到目标的伞头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!