So according to the Swift Community I should adapt Kotlin and not Swift as
my choice for the programming language for a  cross-platform GUI framework?
Is that really going to be easier than building a GUI framework for Android
as listed on this page?

The main technical issues I can think of when building Android Java API
Access is the following:
a) You can only call static Java methods from the NDK Main Thread in Android
b) If I go the Android NDK(C/C++) approach, it provides access to the C++
API of Android but not the Java API of Android. It bootstraps differently
in that you have access to a NativeActivity class but a lot of Java Android
is deriving from an Activity and adding your overrides. I wonder if that
possible doing that with JNI
c) You would not have access to the XML way of declaring an Android GUI but
will have to do everything in code (I have experience in this in Android).
This is not a problem just extra work
d) Since the Java API of Android bootstraps differently you would need to
add libraries to your module maps in Swift so you can bootstrap the Java VM
literally in Android so you have access to the Java Environment via Java
Native Interface.

Anyone else think of how to call Java API from Swift? I was thinking  a
bootstrap Java Android skeleton app, which receives an API via a 64 bit
encoded number. The number is converted into a string and passed into a
switch statement where the correct API call is made.
Any fresh ideas?
Sincerely yours,
Tony Constantinides

On Mon, Oct 17, 2016 at 9:34 AM, Jens Alfke <> wrote:

> On Oct 16, 2016, at 1:35 PM, Tony Constantinides via swift-users <
>> wrote:
> Kotlin does not run on iOS without some custom VM (Robot VM) which would
> kill performance.
> If you mean RoboVM, it claims to use ahead-of-time compilation of Java to
> native code, so there shouldn’t be much of a performance penalty.
> (Definitely a *size* penalty, though!) However, RoboVM appears to have
> been discontinued.
> —Jens
swift-users mailing list

Reply via email to