iOS framework issues

119 views
Skip to first unread message

Darren Nye

unread,
Jul 26, 2021, 10:28:37 AM7/26/21
to j2objc-discuss
I wonder if anyone could provide assistance.

Over the last few days, I have been running some experiments on J2ObjC, and am *amazed* by how well it works. Bravo to all involved; This must have been an herculean effort.

I am having a couple of difficulties which I have worked around, but wonder if the community has any advice as to how to do this better.

Although I have got J2ObjC working within my app separately during testing. When I attempt to integrate J2ObjC into my iOS framework (written in Obj-c), of which my main app imports. I hit a couple of issues;
 
I get the error "Include of non-modular header inside framework module 'oceansignalsdk.BeaconConfiguration': '/Users/user/Documents/Work/tools/j2objc-2.8/include/J2ObjC_header.h'"

I can resolve this issue by setting NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES to YES in the build settings of my app. Is this the right thing to do?
 
Second Issue, the header files generated by the transpiler are not exposed. In a framework project header's are only exposed if you put them in the 'public' section of the headers under build phases, so, I had to drag the generated header files into the framework project as references, then add them to the public section of the headers.

Is this the best way to handle this? Is there a way to automate this step? I worry if I do a clean build or the derived data folder changes etc etc it will all break.

Note, that the framework project itself builds fine, but these issues occur when I try to build the framework project as part of main app.

Omran Khoja

unread,
Feb 21, 2023, 5:44:43 PM2/21/23
to j2objc-discuss
Attempting the same thing. Was there any insights you gained that you can share? 

Raymond Chan

unread,
Apr 28, 2023, 4:00:00 AM4/28/23
to j2objc-discuss

i import the .h .m into a pod.

it shows the same error 

Showing All Errors Only

/ Include of non-modular header inside framework module 'XXX': 'j2objc-path/include/J2ObjC_header.h'

Reply all
Reply to author
Forward
0 new messages