welcome to linkAR technical documentation

next previous

Quick Start Tutorial

2.1.- Setting up the Development Environment

If you are new to iOS developing the following steps will guide you through the very basics of getting started with apple mobile development.
If you already are an iOS developer and have the development environment set up skip to Create new project. Read more on Apple's developer site:


2.1.1.- Become an iOS Developer

AR Tracker applications can not run in the simulator, must be deployed on iOS devices.
You must enroll to the iOS Developer program to deploy applications on iOS devices.
You can enroll here:


2.1.2.- Install Xcode and the iOS SDK

Once you have enrolled in the iOS Developer program, you should have access to the iOS Dev Center.


Go to the Dev Center and download Xcode.


2.1.3.- Set up a Provisioning Profile

  1. Sign into the iOS Dev Center: http://developer.apple.com/membercenter/
  2. Go to the iOS Provisioning Portal
    1. Follow the process to obtain a certificate, assign a device, create an App ID and create a provisioning profile. Use the wildcard character (*) to build and install multiple applications with a single ID.
    2. Download the provisioning profile you have just created and install it on your computer (double click on it).

2.2.- Installing AR Tracker Framework and creating a Hello World Project

2.2.1.- Create new project

Select Create New Xcode Project from the splash screen (seen below) or file→new→project.. from the menu.

2.2.2.- Choose Single View Application template

It will give us a basic app template, with a single UIView we can add the AR Tracker to.

2.2.3.- Fill project details

Make sure use Automatic Reference Counting is selected. Automatic Reference Counting is not mandatory but it makes memory management easier.

2.3.- SDK Files

  • Image Tracking Framework
    • libs/
      • CVSDK.bundle
      • CVSDK.framework
      • 3dEngine.framework
      • EADUtilities.framework
  • samples/

2.3.- Create and configure the project

2.3.1.- Add the following frameworks

Click on the project icon in the project navigator view, and under Build Phases tab, add each framework by clicking on the + button in the Link Binary With Libraries forum.

  • MediaPlayer.framework
  • Accelerate.framework
  • OpenGLES.framework
  • AVFoundation.framework
  • Foundation.framework
  • UIKit.framework
  • CoreMotion.framework
  • libiconv.dylib
  • CoreGraphics.framework
  • CoreMedia.framework
  • CoreVideo.framework
  • QuartzCore.framework

ARLab Frameworks are added from the Add Other Option:

  • 3dEngine.framework
  • CVSDK.framework
  • EADUtilities.framework

Here is how your frameworks folder should look like after you finish:

Now press the “Copy Bundle Resources”, under the “Build Phases” tab. Press the add button (+) and search for the 3dEngine.bundle file.
It should look like this:

2.3.2.- Add the CVSDK (Tracker) framework

* On the top of ViewController.h Include the header file CVSDK.h and a class member of type cvSDK:\\
#import <UIKit/UIKit.h>
#import <CVSDK/ImageTracker.h>
@interface ViewController : UIViewController <trackerProtocol>{
    ImageTracker* _imageTracker;
  • In ViewController.m alloc and init cvSDK in the viewDidLoad method and Set the App Key you received from the registration service in the website.
  • There are 3 options to set the 3DAPIKEY:
    • If you are using the 3DEngine that comes with the Tracking, the lite version, use the same APPKEY as for the Tracker.
    • If you replaced the 3DEngine with the Advanced version, or the PRO version, use the APPKEY you received for that framework (you should have a valid APPKEY for your bundle id).
    • If you do not want to use the image tracking overlay, use an empty string (@””).
- (void)viewDidLoad
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    // Hide StatusBar
    // Init
    _imageTracker = [[ImageTracker alloc] initWithAppKey:@"UWr+GthwLByFBG9ebct5PBXgYQ==" useDefaultCamera:TRUE with3DappKey:@"UWr+GthwLByFBG9ebct5PBXgYQ=="];
    // Register delegate
    [_imageTracker setTrackingDelegate:self];
    // Start
    [_imageTracker start];
  • in viewDidAppear method present the cvSDK view:
- (void) viewDidAppear:(BOOL)animated
    [self presentViewController:_imageTracker animated:NO completion:nil];

2.3.3.- Add Images to Track

In your project, press right button over the folder where you want to add the images.
Select Add files to “YOUR PROJECT NAME”:

Search the pictures under de HelloImageTracking project.

  • Samples
    • HelloImageTracking
      • HelloImageTracking
        • images
          • Compass500.jpg
          • Compass500Overlay.jpg
          • Arlab@25_Compass500jpgdetector_data.dat

Add all those files into the project. Be sure they are added into the project:

Click on the project icon in the project navigator view, and under //Build Phases// tab,  check "Copy Bundle Resources". If any of the files are not added, press the add button (+) and search for them.

2.3.4.- Add Linker Flags

It is necessary to add the following linker flags in the Build settings:
-mthumb -lstdc++ -lz -lm -mfpu=neon -mtune=cortex-a8 -mvectorize-with-neon-quad

  1. Click on the project icon in the project navigator view.
  2. Go to Build Settings.
  3. Search for Linker.
  4. Copy the linker flags into the Other Linker Flags at the project target column.

2.4.- How to Run

  • Connect a supported device (see 1.1)
  • Select the device from the target menu
  • Click on the Run button or cmd + r.

2.5.- How to Debug

  • After running, make a breakpoint at the wanted line to stop the debugger on runtime.
  • To make a breakpoint, click on the left margine of the line and a blue arrow will appear indicating a new breakpoint was made.
  • Click on the debug navigation or cmd+5, to browse a list of the breakpoints.

2.6.- How to upload to the AppStore