I’m creating an app using SwiftUI, and I would like to incorporate a small Java codebase that I created for the Android version of the app. Is there a way to package the Java code to work on iOS and macOS
We already touched on this in your other thread. Honestly, I’m surprised you didn’t follow up there.
As I mentioned on that thread, the focus of Swift’s Java integration is on the Swift on Server. It’s likely that you could reasonably make this work on the Mac as well. Getting it to work on iOS would be quite challenging because Java and iOS have traditionally not been the best of friends. So, I think your first step here should be to ask whether it’s possible to run Java code at all on iOS. Once you have an answer to that, you can then assess the Swift Java interoperability story.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"