Home > Android > Running Swift code on AndroidRunning Swift code on Android Thom Holwerda 2015-10-14 Android 9 CommentsApple’s Swift has been available for over a year now, and Apple has promised it will be made available under an Open-Source license by the end of 2015. That’s great, but could I run Swift code on an Android device today? About The Author Thom HolwerdaFollow me on Twitter @thomholwerda 9 Comments 2015-10-15 12:24 am JondiceOn the other hand, you could just use Kotlin, which is similar in syntax (at least superficially) and is extremely Java friendly.Always good to see more options though. 2015-10-15 1:58 am shmerlOr even better, you can use Rust. 2015-10-15 4:50 pm moondevilAnd have lots of fun writing JNI wrappers. 2015-10-15 8:50 am avgalenAs your link points out:Conclusion: That was fun, but is of course useless:* Generally speaking, the NDK makes sense only for a small percentage of apps, so in the general case Google advises against trying to write a whole Android app using the NDK.* And of course since we’re missing the SwiftCore library this is restricted to a small subset of Swift.If Swift becomes Open Source that doesn’t mean SwiftCore would become Open Source. However lets assume that somebody re-engineers the whole library and re-implements every interface (cue Oracle vs Android Java lawsuit). You could now code your app in Swift and run it on Android (you might have to include that re-implemented SwiftCore with every app)…but that is only your actual code. GUI and all other platform interactions would need bindings and…Basically it could all theoretically get done (which means somebody will actually do it ), but except for “because I had an itch to scratch and think Swift is the Sjizzle” …there isn’t really any reason for doing it 2015-10-15 12:09 pm pmacThey said the standard library will be open source, so I assume it’ll be everything from there down. 2015-10-16 12:50 pm avgalenI had a hard time to believe that Apple would Open Source that library, but you are entirely correct:https://developer.apple.com/swift/blog/?id=291) Swift source code will be released under an OSI-approved permissive license.2) Contributions from the community will be accepted â€” and encouraged.3) At launch we intend to contribute ports for OS X, iOS, and Linux.4) Source code will include the Swift compiler and standard library.5) We think it would be amazing for Swift to be on all your favorite platforms.Actually only 1, 2 and 4 are promises but 3 and 5 indicate that the Swift developers want to “go everywhere”. Let’s hope that marketing/sales/legal will allow them to go 2015-10-15 6:44 pm FawzibI don’t know why this is never mentioned. Everyone talks about Xamarin when it comes to .Net on Android/IOS but nobody ever mentions RemObjects. They have Elements which compiles C#, Oxygene(Delphi like language) and now Swift for Windows/Mac/IOS/Android. 2015-10-16 12:51 pm avgalenPlease read the linked article. Having a compiler is only a very small part 2015-10-17 3:28 am jigzatBad move from Apple to be honest, from the development point of view might look like a good idea to be able to develop for both platforms but in the end it will flood both markets with identical apps making it harder for developers to profit.There is way too much competition on the app store already and some great apps are priced very low not because they are making a lot money but because they are trying desperately to make some.