Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift for Windows and creating GUI

Tags:

I tried to find some answers but cannot really find anything useful. Is there possibility to create a GUI using Swift under Windows? I do not expect a real interoperability between MacOS and Windows GUI but I can't even find any documentation about creating GUI under Windows.

like image 939
Radek Suski Avatar asked Nov 16 '16 19:11

Radek Suski


2 Answers

The best thing I could find in the past months was Silver, a commercial Swift implementation/fork:

With Silver, you can use Swift to write code directly against the .NET, Java, Android and Cocoa APIs. And you can also share a lot of non-UI code between platforms.

Developing Windows applications seems to be free, but the next option costs $799 already.

So you could say Silver is a Swift fork with some extras.

  • Swift updates and Silver updates aren't exactly in lock-step with one another, so you have to wait for the maintainers to update the language to be truly source compatible.
  • Silver extends the language with stuff familiar to Java/C# people.
  • See other limitations.

It seems Silver isn't even 1.0, yet.


I cannot add personal experience; I'm torn at the moment. It looks cool but I don't know how productive you can be, writing code in the latest Swift to compose your types and then hitting language road bumps in Silver. I guess that's why there's a Silver Cocoa bridge: because you'll be writing Silver code, not Swift code, although both are pretty similar.

like image 72
ctietze Avatar answered Oct 04 '22 00:10

ctietze


There are some GUI examples in 'Swift for Windows' project at http://SwiftForWindows.github.io but the GUI toolkit is alpha version.

like image 34
tinysun Avatar answered Oct 04 '22 00:10

tinysun