How to integrate native Java backend with macOS catalyst app UI?
My UI is SwiftUI/macCatalyst, using entitlements for voice recognition and microphone.
My back-end is from a large legacy Java code base rendered to native x86_64 binary.
For now they interface via stdio streams established by the native java command launching the UI app.
This works fine when the Java code runs on a JDK.
When native backend launches the UI app, the UI app fails to secure permissions (but otherwise works fine)
Same result when the backend is bundled with the app as if a command-line tool
Solution constraints:
Unlike the sample app/docs that integrate a command-line tool into an app, this binary cannot be built using XCode's Clang
I'd like to continue using macCatalyst, knowing this can't be deployed to iOS proper, only to macOS.
I can make the UI launch the backend, but don't want to do this without some assurance it would fix things :)
I'd rather not work through the calling conventions/wrappers to staticly link these binaries now.
Assuming the parent process needs the app entitlements, I tried:
To embed the java binary into the SwiftUI app?:
Following instructions for embedding a command-line app did not configure the backend binary with the entitlements?
Deploy the java binary standalone as an app with the proper entitlements?
Similar to above: unable to figure out how
Pointers to docs welcome. I've seen
Embedding Nonstandard Code Structures in a Bundle
Embedding a command-line tool in a sandboxed app
Ideally I'd like to know how to deliver an app whose binary is entirely build using Java native (including proper entitle/sign/credential/notorize/sandbox...)
Thanks!
3
0
1.9k