What is export * in module.modulemap file inside each framework?

Solution 1:

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]