IOS mixed dynamic framework - objc private module bridges

Regarding the purpose of the "dynamic structure", I need to reduce the internal (private) headings objective-cto my counterparts swift.

From my point of view, I need to use a private module.

Some of these quick copies are bound to objective-c using syntax @objc class TheClass.

I went ahead and created a file module.modulemapand module.private.modulemapdirectory by $SRCROOTadding the necessary flags in the assembly configuration.

SWIFT_INCLUDE_PATHS =>$(SRCROOT)/...

I also tried adding a “private module map file” to the build settings

My module map file:

module InnerModule {
    export *
}

and the private module file:

explicit module InnerModule.Private {
    header "../Classes/Header1.h"
    header "../Classes/Header2.h"
    ...
    export * // and have tried without it
}

In all relevant Swift files I have added

import InnerModule.Private

Now when I create a project, I get an error message in my quick 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?

+4
1

, , "private", .

, "".

0

Source: https://habr.com/ru/post/1625876/


All Articles