swiftlang/swift-java

IOS Development.

Closed this issue · 3 comments

Hi team 👋

Thanks for the amazing work on swift-java—the interoperability between Swift and Java is super exciting!

I was wondering if there are any plans or technical considerations around supporting iOS development with this project in the future. It would be great to know if enabling Java interop on iOS is on the roadmap or if there are platform limitations that make it challenging.

Looking forward to your thoughts!

Thanks again 🙌

There are currently no plans to target iOS, no. If someone wanted to experiment with this you can but I'm not sure if this is something we'd want to support.

For known reasons just bringing up a JVM on iOS isn't the best of ideas...

If anything, it might be more interesting to see if one could compile java to binary using native-image and interop with that somehow?

We are interested in supporting Android as a platform though, and a number of community efforts has made nice steps here already:

I've used swift-java's JavaKit as a JNI support library with great success on Android. I was able to fully replace all the supporting JNI code I'd developed (including use of @johnno1962 code and my own JNI library) over 7 years and only rely on Apple's JavaKit for JNI interop, so in my experience JavaKit is Android ready. Checkout AndroidKit and give it a try! AndroidKit SDK release

https://forums.swift.org/t/android-java-and-swiftjni/78890/6


As far as iOS discussions, maybe let's take this to the forums and I'll close the issue since there's no immediate plans here: https://forums.swift.org/t/swift-java-for-ios/79535

We are interested in supporting Android as a platform though, and a number of community efforts has made nice steps here already:

I've used swift-java's JavaKit as a JNI support library with great success on Android. I was able to fully replace all the supporting JNI code I'd developed (including use of @johnno1962 code and my own JNI library) over 7 years and only rely on Apple's JavaKit for JNI interop, so in my experience JavaKit is Android ready. Checkout AndroidKit and give it a try! AndroidKit SDK release

https://forums.swift.org/t/android-java-and-swiftjni/78890/6

As far as iOS discussions, maybe let's take this to the forums and I'll close the issue since there's no immediate plans here: https://forums.swift.org/t/swift-java-for-ios/79535

That is great to hear.
But there is effort being made to bring java to mobile (IOS/Android).
You can look into it.

https://openjdk.org/projects/mobile/

https://github.com/openjdk/mobile