You know that magical device that you carry around in your pocket? That one that lets you call your mom, factcheck your friend at the bar, and catch up on the latest podcast while you commute?
Yep, the little sleek one with its fancy swiping animations. That’s the one we are talking about!
If it seems mysterious and magical it’s because it is, at least a little bit. And if building apps for it seems even MORE mysterious and magical, that’s because building apps for the iPhone is actually quite different than building apps for the web.
Since we are web junkies over here at Skillcrush we aren’t so familiar with those fancy devices, which is why we called Joe Burgess, instructor of the awesome new iOS program at the Flatiron School to explain to us how you build apps for iPhones and why it’s different than building apps for the web.
First things first, what is iOS?
iOS is the operating system of the iPhone and iPad. It used to be just called the iPhone operating system but with the introduction of the iPad, they changed the name to broadly cover all mobile devices.
How does coding for iOS differ from building web apps in Ruby or PHP?
It’s all about the environment. Phone’s are limited in almost every constraint you can think of: memory, processing power, network bandwidth, etc. Every time you use any resource there must be a ton of thought put in about the efficiency of your implementation. On the web, you still need to think about efficient use of resources but it doesn’t really matter until you start to scale up. Even the simplest app needs to think about their resource usage in iOS.
Tell us a little bit more about all the difference types of technology that go into iPhone Apps. What exactly is Objective C?
Objective-C the language you use to write native iOS applications. It’s a superset of C, which means it’s effectively an extension of the C language to make C a bit more “modern.”
We’ve also heard about this thing called Helios, what is it?
When developing iOS apps there are a few common features that users expect, but require a server side backend. To get this functionality iOS devs used to have to learn the basics of server side development and implement the required server side features. Helios makes all this super easy and allows developers to have a backend for core data synchronization, push notifications, in-app purchases, passbook and newsstand with five lines of code. It’s really incredible.
Xcode is an Integrated Development Environment or IDE. Basically it’s the tool you use to develop iOS applications. There are many IDEs out there such as Eclipse or Visual Studio, but Xcode is the IDE specifically designed by Apple for iOS development and integrates with all sorts of tools to make development easier.
Currently Xcode is in version 4.6, but with the release of iOS 7 there will be a new version of Xcode with a bunch of cool new tools like continuous integration for testing.
Now, we know that in iOS there’s no CSS, so how do you make things look good?
Apple has included a lot of default widgets that can be strung together into a user interface. Thankfully, the iOS environment allows for easy customization and gives a great foundation of tools that can be built upon quickly. The biggest challenge in mobile layout is handling the different screen sizes and resolutions. Apple handles this with AutoLayout which allows you to define layouts using constraints. It’s a huge topic so it’s hard to describe in a small answer though.
Why do you love about building apps for the iPhone?
Just the amount of phone usage out there excites me. Never before have developers been able to develop an application that has such an intimate and constant presence in a user’s life. When using a computer or web app the user has to come to the app. For mobile apps, the app can come to the user when needed because of the wealth of information available to apps.
Also, iPhones have some pretty cool features that computers don’t have…
Oh, pray tell!
For example, iOS devices have a lot of interesting hardware built into them beyond the obvious Camera. Inside your phone is a (tiny) Accelerometer, magnetometer (doubles as a compass) and a gyroscope. This allows developers to understand where the phone physically in space and (hopefully) do something cool with that. Also it allows you to handle motion gestures like the shake. I haven’t seen many uses of the hardware that doesn’t seem gimmicky yet, but I know the ideas are out there. It’s all still incredibly new.
We love all the animations that are available on the iPhone.
Yes, animations on the iPhone can be completed at a few different levels of complexity and power. The simplest is handled by Core Animation. Core Animation sits below the basic user interface elements and does exactly what it sounds like. It allows you to animate the different UI elements and other visual elements on your app.
To do more complex things like games, you’ll need to go closer to the hardware and use either Core Graphics for simple 2D animations, or OpenGL which allows the development of incredible 3D games. OpenGL is another massively deep and complex topic, but most animations like the slide out drawer in Facebook can be handled by Core Animation.
Now, we did a little digging and read that you actually taught yourself how to build iOS apps! Amazing! What did you find most challenging about the learning process?
I learned iOS on my own during a project for the Pittsburgh Post Gazette. I had a background in C so learning the syntax of Objective-C wasn’t too difficult. The biggest issue when I started learning was just the size of the iOS ecosystem. It seemed like every time I wanted to implement something there were 100 new concepts I needed to understand before I could write a line of code. Sifting through the technologies you need to know and those you can do without was the hardest for me.
Learning to code is such an insane task because of the scope of the topics available to learn. It can be super tempting to just try and be a sponge and absorb more constantly, but in the end the only way you convert the memorization of techniques to the correct thought processes required for coding is to write a ton of code.
That’s why I, and the rest of the world (including Skillcrush), suggest learning to code by just starting a project. You’ll have to learn more and more to do what you are trying to do but since your goal is to accomplish something, your learning will be more efficient. Every topic has a rabbit hole you can go down easily if your goal is to learn as much as possible, but when your goal is to finish a feature there is a easy endpoint to topic research.