Apple’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?
Apple’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?
On 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.
Or even better, you can use Rust.
And have lots of fun writing JNI wrappers.
As 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
They said the standard library will be open source, so I assume it’ll be everything from there down.
I 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=29
1) Swift source code will be released under an OSI-approved permissive license.
2) Contributions from the community will be accepted ^aEUR” 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
I 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.
Please read the linked article. Having a compiler is only a very small part
Bad 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.