In regards to a "dynamic framework" target, I need to bridge internal (private) objective-c
headers to my swift
counterparts.
From my understanding I need to use a private module.
Some of these swift counterparts are bridged back to objective-c using the @objc class TheClass
syntax.
I've gone ahead and created a module.modulemap
and a module.private.modulemap
file in a directory under $SRCROOT
and added the "necessary" flags to the build settings.
SWIFT_INCLUDE_PATHS =>$(SRCROOT)/...
I've also tried adding a "Private module map file" to the build settings
My module map file is:
module InnerModule {
export *
}
and the private module file is:
explicit module InnerModule.Private {
header "../Classes/Header1.h"
header "../Classes/Header2.h"
...
export * // and have tried without it
}
In all of the relevant Swift files I've added
import InnerModule.Private
Now when building the project I get an error in my swift bridge header
#import <MyFramework/MyFramework-Swift.h> // getting an error here
MyFramework-Swift.h // generated header file
@import UIKit;
@import ObjectiveC;
@import InnerModule.Private; Module InnerModule not found
How can this be fixed?