IOS Session 01: Installing the environment

IOS Session 01: Installing the environment

As part of the ETP on iPad initiative, Al Briggs has opened the nascent source code to me so I can see what a real app looks like in the dev environment! It’s also my hope to be able to implement some of the drawing code directly.

First thing first…setting up!

  1. Installed Mountain Lion, Clean, on my MacBook Pro 17″ from late 2007. It’s old, but it works.

  2. Installed Xcode via the App Store.

  3. Installed GitHub for Mac.

  4. Downloaded the project from Github.

  5. Tried to open the project file and run it. BOOM. Missing header files. I wondered if I had to install the TestFlight SDK, so I emailed Al.

  6. He emailed back that he was using CocoaPods, which is a “library dependency manager” for Objective-C. You can specify the library you want to use, and CocoaPods takes care of grabbing everything that this library needs to work properly so you don’t have to do it manually. It relies on something called /ruby, which is a package manager for programs written in the ruby language, which I needed to install.


p>After some farting around, I found I had to go to XCode’s Preferences and under Components select “Install Command Line Components” so I could run the sudo gem install cocoapods command (gem was already installed as part of the dev tools, I believe), followed by pod setup. I also had to run sudo gem update --system to get the most up-to-date version of whatever gem is.

After that, I went to the directory where I downloaded Al’s source, and typed pod install per Al’s instructions. It started doing this:

    Installing Objection (0.13.0)
    Installing TestFlightSDK (1.0
    Installing OCMock (2.0.1)
    Using Objection (0.13.0)
    Using TestFlightSDK (1.0)
    Generating support files

Al then said to look at the “workspace file” that has been created, which I’m guessing is the file that ends with .xcworkspace. I double-clicked it to see what would happen. I was able to build the project and run it in a simulator. Very exciting!

I poked around the file explorer in xcode, and was reminded of just how old-school Objective-C is compared to C#. I’ll have to read up a bit on this.