My first iOS app!

WWDC

When I went to WWDC for the first time a couple months ago, I was inspired by all the cool demos, people, labs, and apps (shoutout to Shadowmatic!) to start developing for iOS. I had already started to teach myself Swift through the Stanford course on iTunes U, but during WWDC, I decided to just dive in and build a game. 

One of my favorite games is Dots and Boxes: I played it obsessively with friends on the whiteboard everyday in middle school, and even created an AI to play the game in high school. Naturally, I wanted to make a Dots and Boxes app. After half an hour of StackOverflow and Ray Wenderlich, I got two dots on the screen and a line connecting them appeared when I tapped. It was exciting! By the end of WWDC, I had cobbled together a basic game called Tessature that was a variation on Dots and Boxes. 

My 0th app, Tessature 

After WWDC, I continued to work on Tessature. I hit a lot of obstacles: the overall structure of the project was disorganized and growing worse by the day as I added more code, integration with Game Center was laggy and the multiplayer feature worked intermittently. I decided I needed to go back and learn more things if I wanted to develop a functional app. Tessature was fun, but it was too complicated for a first app.  

I went back to the iTunes U Stanford course, coded their mini-projects and learned a bunch of things that would have made Tessature much more organized, efficient, and easier to make: multiple MVCs, how to do things cleanly in the storyboard, autolayout, size classes, protocols, delegation, the view controller lifecycle, timers, segues, persistence, and the app lifecycle. 

...and my 1st app, Miscolor

Around this time, I had a new idea for a game that I wanted to try out. It was based on the Stroop Effect, which you can read more about here

With more experience now, the development process went much more smoothly! Some thoughts:

  • Autolayout took a few tries to get right and was (is) one of the trickiest parts for me 
  • Computed properties and property observers are really useful, and I don't know how I made Tessature without them 
  • Closures can make your code a lot more concise! 
  • Another tricky (albeit minor) part was layering the transparent pause view controller over the game view controller. (Originally, I just had a notification pop up when the user paused the game, but my brother convinced me this didn't fit in with the game UI.) After going through a lot of StackOverflow posts, I learned that it depended on the iOS version:


  • It's really hard to think of an app name that is interesting but not hard to pronounce or spell, catchy and original, and not already taken! I finally settled on Miscolor because Miscolored was taken :P 

Submitting my app for review 

My app was "waiting for review" for a little under two weeks... 

But it was worth the wait...


It was surreal seeing my app on the app store!


A few tips 


  • Don't be afraid to start small 
  • Don't be afraid to start over 
  • The best (and fastest) way to learn is by doing, so jump right in! 

Recommended books and resources 


  • https://www.weheartswift.com/ 
  • iTunes U Stanford course 
  • Functional Programming in Swift 
  • https://iosdevweekly.com/
  • Concepts iPad app (for designing graphics) 
  • http://makeappicon.com/ (complete with a cute toaster animation)

In the future...

I plan to introduce new features to Miscolor including different levels, timer options (right now, the user starts with 15 seconds), game center integration. 

I also plan on developing more iOS games and other apps (look out for future posts on those!) 

Shameless Plug 

Miscolor is easy to learn but hard to master. This is your chance to race against the clock, fight your instincts, improve your mental agility, and kill time! 

Choose the color of the word that appears on the screen, not the word itself. You earn 1 point if you're correct and lose 0.5 points if you're wrong. 

You have 15 seconds. Every time you choose 5 in a row correctly, you get 5 extra seconds!

Miscolor is available for free on the app store now! 

All code mentioned in this post is posted on my Github account. 






Popular posts from this blog

Building A Toy Language Interpreter in Go

Space Race: a simple Rust game built on the Bevy framework

Building a Toy Language Compiler in Go