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 | 1 comment

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 […]


NSDocument initWithType in Swift 2

July 9th, 2015

Filed under: Cocoa | Be the first to comment!

I updated my document-based Cocoa application to Swift 2 in Xcode 7 using Xcode’s converter. The converter changed the initWithType method in my NSDocument subclass to the following: convenience init(type typeName: (String!)) { self.init() // Rest of initialization code here } After doing the conversion the Swift compiler crashed every time I built the project. […]