Tuesday, July 12, 2016

Swift Support

It's new, it's trendy, it's the latest thing: Swift support in WhirlyGlobe-Maply!

Swift has been in there since 2.4.1 (soon 2.5), but we haven't really pointed it out.

Why Swift?


I'm not the audience for Swift.  My favorite language is a mixture of C++ and Objective-C.  You get STL containers, blocks, and ARC.  It's awesome.  Why are you backing away?  Let me tell you more!

This is why I work with other humans.  José was quite interested in Swift and did the bulk of the work.

Swift Interfaces & Documentation


The main issue was Swift bindings for all the various methods.  Swift can interface to Objective-C just fine, but if you want to make it pleasant, it should look like this.

He did that everywhere and tested it out.  The result is a nice, pleasant Swift interface to the main library.  But we didn't stop there.

Feel the learning!



The tutorials have tabs for Objective-C and Swift!

Swift Tests


In the new AutoTester app (post forthcoming) José wrote a bunch of Swift test cases.  These have a pleasing rhythm to them.

Swift-ly into the Future


We're getting user submitted github Issues in Swift now.  Not about Swift mind you, just in Swift.  So that seems to be working.

As Apple changes the language we'll keep up and I think a few new WhirlyGlobe-Maply apps may be written in Swift.