First Course Launches to Develop Apps For Android in Apple's Swift Language

Discussion in 'iOS Blog Discussion' started by MacRumors, Apr 13, 2017.

  1. MacRumors macrumors bot


    Apr 12, 2001

    An Italian school has launched the first Android-specific course in Apple's increasingly popular open source Swift programming language.

    The Swift University based in Reggio Emilia claims to be the first, globally, to offer the course for Android, and aims to show students how to use the programming language across both platforms while avoiding the limitations associated with cross-platform middleware such as Xamarin.

    At the heart of the course is the use of a bespoke integrated development environment (IDE), rather than a converter, that allows coders to program in Swift instead of Java while using the normal classes of the Android SDK. The course summary, through Google Translate, is as follows:


    Swift was introduced by Apple in 2014, with the aim of replacing Objective-C as an easier-to-learn language, and garnered major support from IBM and a variety of apps like Lyft, Pixelmator, and Vimeo. Since then it has steadily risen to prominence among both emerging and established developers, and last month broke into the top 10 in the TIOBE Index, which ranks programming languages by popularity.

    Apple has actively promoted Swift as ideal for children who are keen to code, demonstrating its gentle learning curve in Swift Playgrounds, an app that teaches children how to use the language. Apple has been updating and refining Swift since its debut, and unveiled Swift 3.1 on March 27.

    (Thanks, Marcello!)

    Article Link: First Course Launches to Develop Apps For Android in Apple's Swift Language
  2. iBluetooth macrumors regular

    Mar 29, 2016
    Please, does anyone know what method or way they are using? Please provide a link, I would much rather use Swift than Java. (and its not 1. april)
  3. GubbyMan macrumors 6502


    Apr 3, 2011
    I don't understand. Doesn't everything on Android need to run on the JVM? Are they compiling Swift to bytecode for JVM? I'm not an Android developer so I don't know how this would work.
  4. Avieshek Suspended


    Dec 7, 2013
  5. muharremoglu macrumors newbie

    Jan 19, 2017
  6. UTsuRo macrumors newbie


    Sep 22, 2016
    I was waiting for this. But how is this possible?
  7. OSXATL macrumors newbie


    Mar 11, 2016
    I suspect they are using a transpiler to convert the Swift syntax down to JVM bytecode. This is pretty common in the Java world, as there are several transpilers that allow you to write using one syntax (for example, Groovy, which looks like Ruby syntax) and compile down to the JVM.
  8. Gorms macrumors 6502


    Aug 30, 2012
    Oh, how I dream of official support for Swift from the Android team.

    Who am I kidding, they'd stick with it for 4 years then fork it to create their own version, Swiftyer, or something. *side eyes Blink*
  9. djcerla macrumors 68000


    Apr 23, 2015
    Giving a glass of water to someone in Hell

    Steve Jobs
  10. Tom G macrumors newbie

    Tom G

    Apr 13, 2017
    What limitations are those?
  11. ChristianVirtual macrumors 601


    May 10, 2010
    But how does it d al with differences in UI ?
    I can understand having the "business logic" in swift (or c++11) platform independent; but the UI stuff ?
  12. iBluetooth macrumors regular

    Mar 29, 2016
    Android has native development for C code, for those parts of apps that need to run fast like in games running many frames per second, as Java is slow and has garbage collection which can start unpredictably. The Swift is run like a C app in NDK.
  13. schmidm77 macrumors member

    Jun 15, 2004
    lol, a "bespoke" integrated development environment. So is it only being used by douchie hipsters too?
  14. Schnapple macrumors newbie

    Oct 14, 2014
    Not 100% sure what they mean but I've done a project in Xamarin (back before Microsoft bought them).

    If you're writing an Android app using Android Studio or Eclipse and Java and something doesn't work it might be a problem with Google's code, but you have the vast sea of Android developers to talk to about it. If you're writing an Android app using Xamarin it could be Google's fault, it could be Xamarin's fault (you're not interacting with Google's Android SDK you're dealing with Xamarin's .NET-based wrappers around everything), it could be the Mono Project's fault (since Xamarin is basically commercial Mono), it could be Microsoft's fault (since Mono is a re implementation of .NET, and yes there's been a few issues I've run into where it's blamed on Microsoft). And the only people you can interact with is the tiny subset of Xamarin Android developers and you might just be waiting for one of the four parties involved to fix their stuff or you get to take it into your own hands. Meanwhile the guys doing "native Java" are off and running.

    That's the main thing I can think of. A number of the other issues wouldn't be resolved by this, like how very little code is truly cross platform. Your business rules come across for the ride, that's cool. But interaction with the OS is different per-platform. Networking, graphics, etc. is all different. So you're not losing the need to write/maintain all that separately, you just get to do it with the same syntax is all.

    Of course he could just be referring to the idea that their compiler doesn't turn Swift into code that runs on Android directly but rather compiles Swift into terrifying-to-read Java and then compiles it, which would avoid the wrapper issue to some extent, but would still likely have some problems like however reliable their translator is.
  15. GrumpyMom macrumors 604


    Sep 11, 2014
    Make Android Great Again!

    Sorry, I'm in a weird mood. But as a user of both android and iOS devices I would like better apps for Android.
  16. 1080p macrumors 68030


    Mar 17, 2010
    Planet Earth
    Well... according to the story... there is an Italian school that would love for you to enroll in their course so they can teach you how to do it. Just sayin'...
  17. foobarbaz macrumors 6502a

    Nov 29, 2007
    You should take a look at Kotlin.
    It's pretty similar to Swift and mixes nicely with Java (like Swift mixes with Objective-C).
  18. iSee macrumors 68040


    Oct 25, 2004
    Hm... it would be weird to implement Swifts memory management scheme (ARC) in JVM bytecode. It would coexist with the JVM's memory management scheme (garbage collection). I guess it could be done but might be pretty inefficient in certain cases. Further complications would be, e.g., the Swift runtime. That's either got to be somehow compiled to bytecode or bridged.

    I think more likely they would compile Swift to native machinecode (and use NDK to bridge).

    By the way, I think if the input is a high level language and bytecode is the output, it's a compiler, not transpiler. (It would probably be better to get rid of the word transpiler altogther and just use compiler regardless, because the relative level of abstraction of the input and output is not really a key element of what is being done.)
  19. iBluetooth macrumors regular

    Mar 29, 2016
    Kotlin is still garbage collected, but null pointer checks are nice. But the main problem facing us developers, is that we write first in Swift for iOS and then some supervisor asks for an Android version. Then, it's nice to be able to re-use the Swift models and logic and write the frontend natively in Java.
    I honestly think Google must be considering allowing other languages after being sued by Oracle for their use a Java.
  20. iSee macrumors 68040


    Oct 25, 2004
    It sounds like they aren't... or at least that's what "without a middleware" seems to imply.

    E.g., where a native app on iOS could use Swift + UIKit (and other frameworks), it sounds like in this course you'd use Swift + Android SDK.
  21. foobarbaz macrumors 6502a

    Nov 29, 2007
    The site was offline for a while, now it is available again: It says: "Due to competitive reasons, we will tell you the name of the IDE after the course begins".

    That smells like a scam.

    Why would the *name* of their bespoke IDE reveal a secret, unless it's not so bespoke after all. Notepad and command line?
  22. scottishwildcat macrumors regular

    Oct 24, 2007
    UIs would be implemented using the same Android libraries that you use today. You'd just call their APIs from Swift instead of Java, just like you can now call Cocoa APIs from Swift instead of Objective-C.
  23. DeepIn2U macrumors 603


    May 30, 2002
    Toronto, Ontario, Canada
    SHUSH! You guys are asking too many questions ... to the reason of 'who cares'.

    The answer is "it just WORKS" to the reason of developers will get the message and stop dealing with Android.

    The best answer to all the above questions!

    But yes Android will probably just port Swift ... hmm can an SDK be patented?
  24. Snowshiro, Apr 13, 2017
    Last edited: Apr 13, 2017

    Snowshiro macrumors 6502

    Jan 12, 2008
    The article writer has no idea what Xamarin does. They just plucked something out of the air to sound informed. They would have been better to pick something like Cordova or Titanium.

    I'm a professional Xamarin developer. Xamarin leverages the iOS SDK that ships with Xcode and uses the same LLVM compiler as objective C. Basically when you build a Xamarin app, you're using UIKit UI classes like ViewControllers and TableViews and binding to the native libraries provided by Apple, so there's no real difference between a Xamarin app and a natively developed app. The only real difference is that you're bundling in .NET assemblies that C# developers use (since Xamarin uses C#) which have a runtime that is so well optimized that there are benchmarks out there (these are a little old, but the best I could find in a few seconds) that show that Xamarin is actually faster than Objective C on iOS and Java on Android.

    This is not an anti-Swift rant at all. I'm super excited by cross-platform Swift (when it's mature enough to realistically use). It's a great language and I hope the momentum behind it continues to grow. One of the disadvantages it has right now though is that Xamarin can leverage the entire .NET library ecosystem in its arsenal - libraries which are designed to be platform agnostic, so implementing that code share across all platforms is super easy because you can just write pure .NET code and it'll work anywhere. That doesn't really exist in the same way for Swift right now.

Share This Page

28 April 13, 2017