What is export * in module.modulemap file inside each framework?(每个框架内的 module.modulemap 文件中的 export * 是什么?)
问题描述
我创建了一个名为Communication
的框架,在框架容器内有一个module.modulemap
文件.
module.modulemap
框架模块通讯{伞头Communication.h"出口 *模块 * { 导出 * }}
我可以理解该模块需要伞形标头才能将其公开给包含应用程序/目标.
但是另外两行代码是什么意思.
导出 *模块 * { 导出 * }
如果有人知道这行输出的是什么?
Objective-C Module Map(.modulemap) for Objective-C and Swift
Objective-C 语言为 Objective-C 和 Swift 语言公开 API 思想 .modulemap
您应该手动创建和设置它
即使你创建了 Swift 框架 Xcode 也会自动创建 modulemap
[在同一个应用程序中混合使用 Objective-C 和 Swift]
I have created one framework named Communication
, inside framework container there is one module.modulemap
file.
module.modulemap
framework module Communication {
umbrella header "Communication.h"
export *
module * { export * }
}
I can understand that module required umbrella header to expose it to containing application/target.
But what is meaning of other two lines of code.
export *
module * { export * }
If any have idea what this lines exporting ?
Objective-C Module Map(.modulemap) for Objective-C and Swift
Objective-C language exposes API thought .modulemap for Objective-C and Swift languages
[ObjC Module]
[Custom .modulemap]
It is about LLVM Modules and Module Map Language. Modulemap
exposes C header files for external binaries. It is a bridge between module and headers. Modulemap helps to convert #include, #import -> @import
because it has a mapping between module name and headers inside. Also modulemap helps to create standalone additional modules and submodules. Modulemap can contains a lot of modules(only one has to have the same name as product name) and a lot of submodules
//Objective-C exposes API thought .modulemap for Objective-C and Swift
.h.m uses .h.m = Objective-C consumer, Objective-C producer = .modulemap
.swift uses .h.m = Swift consumer, Objective-C producer = .modulemap
Framework which includes .modulemap
is called Modular Framework
. Path:
module_name.framework/Modules/module_name.modulemap
Setup
- When you create a library[Example] you should create and setup it manually
- When you create a framework[Example] it is setup automatically
Even if you create Swift framework Xcode automatically creates modulemap
[Mixing Objective-C and Swift in the same Application]
这篇关于每个框架内的 module.modulemap 文件中的 export * 是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:每个框架内的 module.modulemap 文件中的 export * 是什么?


基础教程推荐
- AdMob 广告未在模拟器中显示 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01