Limiting Device Orientations in an iOS App

January 8th, 2017

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

I’ve been developing an iOS Game that is meant to be played in landscape orientation. I had problems forcing the game to be played in landscape orientation, causing the game to be rejected by Apple the first time I submitted it. Limiting an iOS app’s device orientations is trickier than you would expect. I didn’t […]


Keep Part of a SpriteKit Scene from Scrolling

August 8th, 2016

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

I covered the basics of scrolling a SpriteKit scene with a camera node in my Scrolling a SpriteKit Scene with SKCameraNode article. But I didn’t cover one thing many games need. Many games use part of the screen to display vital information to the player such as score and health. When you scroll the game […]


Accessing a SpriteKit Scene’s View Controller

July 11th, 2016

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

If you’re using Game Center in a SpriteKit game, you present Game Center view controllers to show things like leaderboards and achievements. To present a Game Center view controller, you need to access the SpriteKit scene’s view controller. The good news is accessing the scene’s view controller takes only one line of code. Adding the […]


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


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