Addendum for our Swift book

On 8 April 2015, Apple released Xcode 6.3, updating the Swift language to Swift 1.2. We spent some time working through our recent book, Swift Development with Cocoa, to make sure we knew how the changes impacted the example code, and to provide updated code as needed.

We're pleased to say that the required changes are minor! We've pushed a full set of updated example code to the GitHub repository, available here. We've also made a changelog, listing the differences between the code examples in the book, and the current best-practice with Xcode 6.3:

  • NSApplicationMain(C_ARGC, C_ARGV) has been replaced with NSApplicationMain(Process.argc, Process.unsafeArgv)

  • Several methods that were implementations of protocols had the optionality of their parameters changed. For example, the applicationDidFinishLaunching parameter originally had a parameter of type NSApplication!, which has now changed to NSApplication.

  • Several properties changed from being optional to non-optional, or vice-versa.

  • Swift now has a "forced cast" operator, as!, which is used when down-casting from a class. We've update the code to use as! when appropriate (such as when downcasting from NSObject to CLLocation)

  • Changed NSCalendarUnit.DayCalendarUnit (which was deprecated) to NSCalendarUnit.CalendarUnitDay

  • Changed "countElements" to its new replacement, "count".

You can also find the changelog in the GitHub repository. The changes are all very minor, thanks Apple! If you have any questions, don't hesitate to contact us! Thanks for buying our book, we love hearing from readers.

What we're up to in 2015 (so far!)
Swift Development with Cocoa, new from Secret Lab.

Swift Development with Cocoa, new from Secret Lab.

Swift Development with Cocoa

The new year started off with the official launch of our latest book (co-authored with Tim Nugent): Swift Development with Cocoa.

It covers everything an existing programmer needs to know to build OS X and iOS apps with Apple's new programming language, Swift. You can buy it at O'Reilly, Amazon, as well as many other reputable book sellers.

Ultimate Swift Programming 

We also released, through O'Reilly and again working with Tim Nugent, a 12-hour video tutorial on Swift and Cocoa programming for OS X and iOS: Ultimate Swift Programming: Language, Frameworks, Tools. It's an excellent learning resource on its own, but it also serves as a great accompaniment for the book. It's available at O'Reilly.

Webcasts

Video production command centre, during webcasts.

On top of making pre-recorded videos (Hobart has been a hive of video production and post-production!), we also did two live webcasts for O'Reilly: one on Five Swift Essentials, and one on Building a game in under an hour with UnityThese were recorded and broadcast on Tuesday, 11 February 2015/Wednesday, 12 February 2015 (depending on your timezone), and by all accounts were a great success. Both webcasts were recorded, and the videos are available in their original format via the links above. We'll also post the code and notes right here when it's ready (in a day or two).

New Books

We're working on five more books at the moment (yes, we're possibly insane), and we'll be announcing them very soon. Stay tuned for news! 

New Games

There are three games we're currently working on: Button Squid, Rocket Box, and Gnome's Well That Ends Well. Our local newspaper featured us recently as well, talking to us about our games.

Button Squid, our squid-themed puzzle game is in development, and you can follow it on the Button Squid Tumblr and on Twitter @ButtonSquid. There's also a teaser site at buttonsquid.com

Rocket Box, a working title, is our economic space empire building game, and you can follow it on the Rocket Box Tumblr, and on Twitter @RocketBoxGame.

And finally, Gnome's Well That Ends Well, a puzzle game featuring gnome dismemberment, which you can follow on Twitter @GnomesWell, and the Secret Lab Tumblr.

Webcasts – Swift and Unity

These webcasts have both happened already! We'll be posting the content here within 24-48 hours! Thanks for watching!

We're doing two webcasts with O'Reilly Media in the coming week. They're both free and the content we cover is a lot of fun. They are:

Both webcasts are free, and you can register for them via the links above. We'd love to see you there! 

Unite Australia 2014

We had a total blast at Unite Australia today in Melbourne. It's the first time that Unite has been run in Australia, and the Unity team was clearly really excited to be here. While much of the content was stuff thats already been announced at the main Unite conference, the Australian satellite conference was a great opportunity to get info straight from the developers.

The big announcement at the keynote was the availability of the first public beta of Unity 5. Unity 5 is looking huge, and is packed with very cool features and improvements to the workflow. One of the most interesting things, from our largely technical-artist-focused perspective, is the inclusion of an incremental workflow for global illumination. Global illumination makes for some fantastic looking scenes, but the main drawback has always been the problem of waiting for the system to finish baking the lights when you make a change.

Another huge new feature mentioned in the keynote is a brand new audio mixing system. This system is extremely configurable, and easy to tie into the scripting system. It looks like sound designers are going to have a much easier time designing really immersive environments, and we can't wait to get to play with it.

The single biggest new feature, our opinion, is already available. The new GUI system, which has been long-promised and became available in the betas of 4.6. The new GUI has to solve a lot of different problems, and be applicable on both desktop, mobile and console environments; additionally, the fact that there are a billion and one different screen resolutions out there can make a UI designer's life distinctly unpleasant. We're particularly taken with their approach to scaling UIs to meet this problem: design everything based on a "reference resolution", like 800x600, and give the system a fuzzy hint that it should try to prefer to preserve the width or height when the aspect ratio changes.

Another great new feature that's landing with Unity 5.0 is the WebGL deployment target. WebGL has become a lot more available over the last few years, and a plugin free method of getting games into the browser is totally awesome. We spent some time going through benchmarks, and the performance looks great. Expect web-based demos from us, and may other game developers, in the future. 

Things mostly wrapped up with a session on the future roadmap of Unity. The biggest takeaway that we got was their intent to make a larger number of their high-level features available as open source libraries. Both the new GUI layer and the new networking system are intended to go open source, and the team on stage made it very clear that this was a pattern that they plan to follow for more features.

We're really looking forward to playing with the 5.0 beta, and can't wait to pull it apart for inclusion into our upcoming O'Reilly Media book, Mobile Game Development with Unity. The next few months are going to be a lot of fun. Follow us here, and on Twitter @thesecretlab for updates.