Skip to content
coneybeare edited this page Sep 27, 2014 · 4 revisions

Basic Armchair Installation

A basic installation of Armchair takes just a few minutes to complete. Check out the above screencast that documents the following steps.

Step 1: Get Armchair Code

You can either add the project as a git submodule, check it out separately or download a non-versioned copy. this video uses a downloaded copy that I have stored on the computer's desktop, but the steps are similar no matter how you got the Armchair code.

Step 2: Add Armchair.xcodeproj as a dependency of your existing project

Adding Armchair as a dependency ensures it is built for your app as needed. To do this, drag Armchair.xcodeproj from Finder into your project's sources panel

Step 3: Add Armchair as a Target Dependency

Go to your project targets's Project Settings, then to Build Phases. Under "Target Dependencies" click the "+" button and add Armchair > Armchair as a dependency. If you have any localization in your app, also add the Armchair > ArmchairLocalization bundle here as well. If you are deploying a OSX target, use the Mac variants instead.

Step 4: Link Armchair Library

Still in Build Phases, under "Link Binary With Libraries", drag the Armchair.framework from the source pane over to the list. There are 2 frameworks: drag the first one for iOS, the second for OSX

Step 5: Add Copy Frameworks Phase

(This step was not shown in video, but is essential for iOS 7 development)

Still in Build Phases, click on the + button at the top left of the panel and select "New Copy Files Phase". Rename this new phase to "Copy Frameworks", set the "Destination" to "Frameworks", and add Armchair.framework.

Step 6: Copy Armchair Localization Resources (optional)

If you added ArmchairLocalization to your target dependencies and want to localize, you need to grab the localization bundle which contains the translation strings. Still in Build Phases, under "Copy Bundle Resources", drag the Armchair.bundle from the source pane over to the list. There are 2 bundles: drag the first one for iOS, the second for OSX

Step 7: Add 1-Line of Required Armchair Code

Open your AppDelegate and insert import Armchair at the top of the file.

Setup Armchair in the overridden initialize() method so that it loads and can observe app lifecycle notifications (appDidLaunch, etc...) and replace the appID string with your app's iTunes App ID.

override class func initialize() {
    Armchair.appID("12345678")
}

Step 8: Add Optional Armchair Code (optional)

There are a million ways to configure Armchair for more advanced and customized setups. Check the README for more info.

Clone this wiki locally