Getting Started

vtourraine edited this page Apr 9, 2013 · 1 revision
Clone this wiki locally

This is a guide to help developers get up to speed with SZNAltmetric. It is geared primarily towards anyone who is new to Mac or iOS development, or has not worked extensively with 3rd-party libraries before.

These step-by-step instructions are written for Xcode 4.2, using either the iOS 5 or Mac OS 10.7 SDK. If you are using a previous version of Xcode, you may want to update before starting.

Step 1: Configure AFNetworking

SZNAltmetric is built on top of AFNetworking, a delightful networking library for iOS and Mac OS X.

You can find detailed instructions on how to configure your Xcode project from the AFNetworking Wiki.

Step 2: Download SZNAltmetric

Now, we need to download the latest source code from the SZNAltmetric repository.

Click here to download SZNAltmetric in a zip archive

Once the download has finished, unarchive the zip file and open the resulting directory. The folder we’ll be interested in later is named "SZNAltmetric", but hold off on doing anything with that for a moment.

Step 3: Add SZNAltmetric to Your Project

Once we have the latest version of SZNAltmetric, we’re ready to add it to our project.

An Xcode project file organizes your source code files and manages the settings needed to build and distribute your app. When you open your project, you should see an Xcode workspace, with a toolbar across the top, a directory listing on the left, and an editor next to it on the right.

For now, we’re interested in the directory listing on the left. If you don’t see a list of files, go to “View > Navigators > Show Project Navigator”, or use its keyboard shortcut, ⌘1.

Now, go to “File > Add Files to '(Project Name)…'”. You will be presented with a dialog sheet with a file browser and a few other controls. In the file browser, go to that unarchived folder from the code we downloaded a few minutes ago, and select that “SZNAltmetric” folder (be sure to select the folder itself, rather than any the files in the directory).

Check that the options below the file browser are as follows:

  • Destination ☑ Copy items into destination group’s folder (if needed) [Checked]
  • Folders ◉ Create Groups for any added folders [Top Item Selected]
  • Add to Targets ☑ (Project Name) [All Targets Selected]

Finally, click “Add”. A new “SZNAltmetric” group will have been added to your project, which corresponds to the folder that is now in your project directory.

Step 4: Check That Everything Is Working

Now that our project is all set up with SZNAltmetric, let’s try building the project. Select “Project > Build”, or use its keyboard shortcut, ⌘B.