I have an Objective-C framework (framework A) that exposes some public and some private headers. The public headers are also declared in the framework\'s umbrella header. I
You need to modify framework A
, So that it export a private module.
Create a private module map file in A
project. This would be something like this:
A/private.modulemap:
explicit module A.Private {
// Here is the list of your private headers.
header "Private1.h"
header "Private2.h"
export *
}
In the "Build Settings" of framework A
target, search "Private Module Map File" line, and make that:
$(SRCROOT)/A/private.modulemap
Do not include private.modulemap
file in "Compile Sources". That causes unnecessary warnings.
Clean and Build framework A
target.
In framework B Swift files. you can import the private module like this:
import A
import A.Private