Getting Started Guide

Ian Busch edited this page May 19, 2016 · 98 revisions

Importing the Framework

  1. Download the latest version of the SDK from GitHub or clone the repository directly by executing

    git clone https://github.com/Adonit/Adonit-iOS-SDK.git

    from the command line.

  2. Open your project in Xcode

  3. Select your Project in the Project Navigator and then choose Add Files to…

    Add Framework

  4. Select the SDK's Framework. Make sure Copy Items if needed is checked. Then click Add.

    Adding Framework

  5. The SDK should now appear in the list of Linked Frameworks and Libraries

    Framework Added

  6. The SDK also requires three other iOS frameworks

    • CoreMotion
    • CoreBluetooth
    • SystemConfiguration

    Press the + button underneath the list of frameworks, and add these additional frameworks. After you are done, your list of Linked Frameworks should resemble the following.

    Other Frameworks

  7. Add two additional Other Linker Flags (ObjC and all_load) as shown below.

    Linker Flags

  8. Be sure to include the SDK’s header file wherever you wish to use it within your application like so

    #import <AdonitSDK/AdonitSDK.h>

Importing the Bundle

If you're going to be using any part of the SDK's Connection and Settings UI, you'll also need to import the SDK's bundle into your application.

  1. Select your Project in the Project Navigator and then choose Add Files to…

    Add Bundle

  2. Select the SDK's bundle. Make sure Copy Items if needed is checked. Then click Add.

    Adding Bundle

  3. The bundle should now appear under the Copy Bundle Resources build step.

    Bundle Added