A Swift Adventure

I am a junior developer that has never coded an iOS app in my life. To help me improve this skill, I was given a week and a half to learn the basis of Swift and develop an app for iPhone and Apple Watch. I decided that I would make a memory game using the most amusing pictures of Matchbox employees that I could find. To start off, I read through the documentation, experimented a little in the playground, and then followed a few tutorials to get to grips with it. The next afternoon, I began to make my first app.

Where to begin

I started by making a basic iPhone only version using SpriteKit. Once this was working fairly well, I tried to recreate the same for Apple Watch. As WatchOS doesn’t support SpriteKit, this allowed me to see the differences between this and the basic UI elements. After having the chance to use both, I am able to say that I prefer the basic UI as it was simpler to use and needed less code to achieve the same result; but for animations on more complex games then SpriteKit would likely be the better choice. Now that the basis for both platforms was created, I added a scoring system and a timer to make it competitive and it was ready to go. There are a few things that I didn’t have time to cover, such as a leaderboard and a shared best score between the iPhone and Apple Watch, but the general idea is working well.

What I’ve learned

This app was a really good way to introduce myself to the Apple development environment and the Swift language. Swift is much easier to read (compared to Objective-C) and can be picked up pretty quickly as well, but the tutorials and documentation are a little poor as the language is new and still evolving. Swift looks promising but there are a few things that need to be improved, like the refactoring of variable or the iPhone/Apple Watch simulators.

Maybe the Matchbox Xbox addicts will swap FIFA 16 for my memory game?…