-
Notifications
You must be signed in to change notification settings - Fork 137
Basic Installation
A basic installation of Armchair takes just a few minutes to complete. Check out the above screencast that documents the following steps.
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.
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
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.
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
(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.
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
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")
}
There are a million ways to configure Armchair for more advanced and customized setups. Check the README for more info.