I want to learn how to code an iOS app, but learning from the ground up without guided instruction is almost impossible. The hack way to do it is to reverse engineer the language. Instead of learning the language as you build something, learn the language as you tear something down. This form of learning is a bit more time consuming but obviously less costly than paying for class after class. I can skip the tedium of prerequisites and jump right into what I want to do… learn to make an app. This is the hacker way of learning. There will be lots of wholes in my knowledge of how these apps work and I will always be at a disadvantage as I may simply not understand a simple fundamental building block. An advantage of this learning style, aside from instant gratification, is the freedom to look at the code from a point of view that lacks institutionalized restrictions. That is there never is a box to think into from the first place, as I am tearing it away from the start.
I have my tools: A Mac, with OSX Lion and Apple’s Xcode. Now for the box, filled with all of its juicy treasures. In order to reverse engineer I need something I can break over, and over, and over, again while learning how the different pieces fit together. This is where the beauty of open-source comes into play. Depending on the license, an open-source application gives me the ability to legally tear it appart, find out how it works, and even turn it into something different.
Lets go over a one-two-three on what I am doing, and maybe someone out there can give me a pointer. If anything is less than clear drop a comment and I’ll update accordingly.
1. Download Apple’s iOS Xcode. (Mac AppStore)
After downloading Apple’s Xcode from the AppStore. This looks simple enough for a hacker to learn, the GUI is complex but manageable and there seems to be at least a decent amount of documentation. This is why apple has such a loyal fan base, its software has always made it easy enough for anyone to have a go at whatever they can imagine.
2. Download Source Tree. (Mac AppStore)
This, I learned tonight, is a Subversion cloning tool… which means you can make a copy of the source code you find on the internet. Source Tree creates two types of local repositories from the source, for the purposes of this hack session I am sticking to GIT only because it is accepted by xcode.
I should point out that you can add repositories directly to xcode. I successfully added the repository for the WordPress App, and subsequently deleted it. I am playing with things I do not understand and do not want to tear up other peoples work in the mean time. By using Source Tree to copy (clone) all of the data onto my machine I can break it all I want without pissing off an entire community. I am sure they have backups and redundancies to keep that sort of thing from happening but I don’t want to test it. I will keep my little games in my own sandbox until I feel comfortable enough to play with the big boys.
3. Find an Open Source iPhone App.. ie. google “opensource ios app”
I looked at a few, and wanted to dive into the WP for iPhone app right away, but because I literally have no idea what I am doing I searched for a bit longer and found a very basic app to start with. I’m going with PlainNote, a simple text input app, a lot like “Notes” but not so flashy.
4. Get your GIT clone.
Copy and paste the following into Source Trees URL and specify the folder you want it cloned to. Source Tree will fill the folder with all of the needed goodies.
https://github.com/vkoser/PlainNote.git
5. Open the Xcode File.
One of the goodies cloned from the repository is the PlainNote.xcodeproj File. Just open it up with Xcode and you have yourself a fun little app to play around with.
Thats it. The playground is open. The main issue with opensource apps is getting them to run on the brandnew iOS 5 system. Xcode does a great job at automatically detecting and fixing the problem with PlainNote, but I still haven’t been able to get some of the other opensource apps I’ve tested running in the Simulator.


