umbrella header for module #39;myFramework#39; does not include header #39;otherFramework.h#39;(模块“myFramework的伞头文件不包括标题“otherFramework.h)
问题描述
我的 Swift/iOS9 框架 'viewer_protocol' 使用另一个外部 Objective-C 框架(
我在这里缺少什么?我在我的框架中使用了其他几个外部框架,它们没有任何警告 - 所有这些外部框架都是用 Swift 编写的 - CocoaAsyncSocket 是纯 Objective-C.
这是我的框架 module.modulemap:
框架模块 my_project {伞头my_project.h"出口 *模块 * { 导出 * }}模块 viewer_protocol.Swift {标头my_project-Swift.h"}
更新
我找到了解决方案:从
更改我的框架标题中的导入语句#import <CocoaAsyncSocket/CocoaAsyncSocket.h>
到
#import "CocoaAsyncSocket/CocoaAsyncSocket.h"
现在 Xcode 找到了头文件,警告消失了.
我最近遇到了同样的问题.显然我在目标成员中将头文件设置为 public
,但它没有在伞头中公开.通过使用 project
访问而不是 public
来修复问题.
My Swift / iOS9 framework 'viewer_protocol' uses another and external Objective-C framework (CocoaAsyncSocket). I'm using Carthage to build CocoaAsyncSocket. So far everything works fine: In have an example App inside my framework Xcode Project using my framework without any problems.
Now I want to use my Framework in a different Xcode Project - although using Carthage. I include only my Framework as a dependency and Carthage automatically resolves the dependencies to CocoaAsyncSocket. I embedded both frameworks into this new Xcode Project and build my App: Everything works fine here - except one warning I can't rid off:
/Users/John/Repositories/my_project/<module-includes>:1:1:
Umbrella header for module 'my_project' does not include header 'GCDAsyncSocket.h'
This is my framework header:
#import <UIKit/UIKit.h>
//! Project version number for my_project.
FOUNDATION_EXPORT double my_projectVersionNumber;
//! Project version string for my_project.
FOUNDATION_EXPORT const unsigned char my_projectVersionString[];
// In this header, you should import all the public headers of your framework
using statements like #import <my_project/PublicHeader.h>
#import <CocoaAsyncSocket/CocoaAsyncSocket.h>
As you can see CocoaAsyncSocket.h is imported. Furthermore inside my framework the CocoaAsyncSocket.h file is included:
What I am missing here? I'm using several others external frameworks inside my framework, there're no warnings for them - all of these external frameworks are written in Swift - CocoaAsyncSocket is pure Objective-C.
This is my frameworks module.modulemap:
framework module my_project {
umbrella header "my_project.h"
export *
module * { export * }
}
module viewer_protocol.Swift {
header "my_project-Swift.h"
}
Update
I found a solution: Changing the import statement in my framework header from
#import <CocoaAsyncSocket/CocoaAsyncSocket.h>
to
#import "CocoaAsyncSocket/CocoaAsyncSocket.h"
Now Xcode finds the header file and the warning disappears.
I recently ran into same issue. Apparently I had header file set as public
in target membership, but it was not exposed in umbrella header. Fixed issue by making header file with project
access instead of public
.
这篇关于模块“myFramework"的伞头文件不包括标题“otherFramework.h"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:模块“myFramework"的伞头文件不包括标题“otherFramework.h"
基础教程推荐
- 从 UIWebView 访问元数据 2022-01-01
- Firebase 云消息传递令牌未生成 2022-01-01
- UINavigationBar 隐藏按钮文本 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- EditText 中的 setHintTextColor() 2022-01-01
- UINavigationItem 的持久 rightBarButtonItem 属性 2022-01-01
- Android - 如何在runOnUiThread 中将数据传递给Runnable? 2022-01-01
- 在视图控制器的宽度上水平均匀分布 UIButton 的最简单方法? 2022-01-01
- 更改 UITableView 部分标题的颜色 2022-01-01
- 在 iOS 7 下 CCMenu 错位 2022-01-01