Creating a Simple Mac Application Using Cocoa, Swift, and Storyboards

March 31st, 2017

Filed under: Cocoa, Mac Development | Be the first to comment!

I’ve noticed there aren’t many articles or tutorials online about writing Mac apps in Swift. To help fill the void I’m writing this tutorial that guides you through the creation of a simple Cocoa app in Swift. The app converts temperatures from Celsius to Fahrenheit. Enter a temperature in Celsius, click a Convert button, and […]

Authenticating Game Center’s Local Player in a SpriteKit Game in Swift

June 6th, 2016

Filed under: Game Development, iOS Development, Mac Development | Be the first to comment!

Authenticating the local player for Game Center in a SpriteKit game requires two steps. The first step is to call the GKLocalPlayer class method localPlayer, which gives you access to Game Center’s local player. The second step is to supply a closure for the local player’s authenticateHandler property. This closure takes two arguments: a view […]

Missing Required Module SwiftShims Error

April 8th, 2016

Filed under: Xcode | 2 comments

I recently migrated to a new Mac. On the new Mac I’m using an external SSD as the startup disk instead of the internal hard drive. To keep the SSD from filling up with things like photos, music, and iOS apps, I moved my user folder to the internal hard drive. This moving of the […]

Saving Game Data with NSCoding in Swift

March 23rd, 2016

Filed under: Game Development, iOS Development, Mac Development | 11 comments

I reached a point in developing LetterMiner where I wanted to save the game when the player quit so they could pick up where they left off. I didn’t find a lot of information online on saving data in SpriteKit games so I’ve decided to share what I’ve learned. I hope it helps other people. […]

Checking API Availability in Swift 2

October 12th, 2015

Filed under: Mac Development, Xcode | Be the first to comment!

When developing Mac and iOS applications, the recommended approach to support older operating systems is to use the most recent SDK and set the deployment target to the earliest operating system your application supports. Until recently the problem with this approach is there was no way to tell at compile time if your code used […]