Swift on Fire - Build Applications with Swift for Windows on a Mac

Wow!! I was quite excited when Microsoft announced that they would have iOS and Android compatibility in their apps. This was amazing news, after all there are so many developers that have worked hard to make applications for a uniform platform. This is not a comparison of other solutions that are available to build Windows apps on a Mac, this is specifically about an amazing product called Fire that allows you to create Windows applications using the Swift language and on a Mac and Windows.

What is Swift?

It is possible that you are a Windows developer and have not heard about swift, please refer to the multitude of articles on the net about Swift, if you still cannot find anything, please head back to the safe confines of Visual Studio or your IDE of choice to build Windows apps.

Even Apple Developers do not use Swift as yet

Yes and No!. Swift is new and evolving but the acceptance is quite high and many are wanting to use swift in their projects.

So where's the Fire?

RemObjects is a company that has created the ElementsCompiler. They have created Silver, which is a free implementation of Swift available for .Net, Java and Android. This is an insight of what Swift would do when it is Open Sourced for all to use. Silver is available for Free and comes with the Mac IDE called Fire or with Visual Studio on Windows.

Can I convert my C# or Java Code to Swift?

Yes, you can (upto an extent) They also provide an online converter called Oxidizer, this can help you convert your code into Swift.

Why is this significant?

Users are now no longer classified into Windows vs Mac vs Unix users, they use a combination of technologies, they could have an iOS device with a Windows box or a Linux box, so there are plenty of combinations. However said that you might have the need to write once and compile to many platforms otherwise it would be very difficult to really manage all of the builds and code. Add to that the fact that you would need to be an expert in Objective-C, Java and C# which is very rare and difficult. However if you had one language that you could use that compiled for most platforms, that would be amazing, wouldn't it?

Options

There are a couple of options that allow you to create cross-platform applications. Each has their own pros and cons which in this article.

  • Mono
  • allows you to compile applications that use C# and the Microsoft dotNet framework and can be run on Mac, Linux and Windows
  • Silver
  • uses Swift as the language and generates executable that can be run on Windows and Mac OSX (console apps for sure)
  • Xojo
  • This uses the Basic language to compile apps for Windows, Linux and Mac and also for the web and iOS platform.
  • CoronaSDK
  • This uses Lua language to create apps for the iOS, Adroid and also for both Mac and Windows (though this is just a stub)
This list is not exhaustive, this is just the beginning, there are other companies that are working on converting the source code from Java to Objective-C or from Objective-C to Java. With swift in the mix, maybe this might get easier.

Summary

When Apple or Microsoft announce something it had a lot more riding on it as these companies are considered trustworthy in comparison. It is also that since they own one technology, it is about translating to the other which these would (hopefully) do a better job of. However when they provide something that does not work or simply give up on some good work they were doing, it is indeed a loss. For example Microsoft was working on a project called ANGLES, this was to translate the OpenGL calls to DirectX (or something to that effect).

There is an Open Source Objective-C project and Swift will be Open sourced soon, so cross-platform development would become more relevant and important. It is good to know the options available and the direction things are heading.

Please let us know your thoughts by commenting below.

Comments

Popular Posts