BouncyCastle + J2ObjC 2.6 + XCFramework - works for iOS but not for macOS

86 views
Skip to first unread message

Dev Sanghani

unread,
Jun 10, 2020, 4:03:39 AM6/10/20
to j2objc-discuss
I'm trying to use J2ObjC to use BouncyCastle on macOS/iOS, and have succeeded in getting the ~2500 files compiled & working on iOS with the JRE XCFramework + Security Framework. 

While trying to do the same thing on macOS, it's throwing a lot of compilation errors (See attached).

Both use:
Frameworks & libraries: JRE.xcframework
Framework Search Paths: dist/frameworks
Header Search Paths: dist/include (does not work without this on iOS)

Any ideas?



Screenshot 2020-06-10 at 1.28.06 PM.png

Dev Sanghani

unread,
Jun 10, 2020, 4:19:38 AM6/10/20
to j2objc-discuss
Use Header Maps = NO seems to have solved the issue

Tom Ball

unread,
Jun 12, 2020, 8:04:00 PM6/12/20
to j2objc-discuss
That's great your project is unblocked.

One way you avoid having to add org/bouncycastle/x509/CertPathReviewerMessages.properties as an iOS resource in each build target that uses your library is to use the gen_resource_source.py script to convert that file into an Objective C source file. That way, it's automatically linked in as part of your library, and only has to be re-run when the resource file changes.

--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/j2objc-discuss/268d657f-6147-4f39-bb81-355f1c448cbeo%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages