Developer Guide

Tutorial: Set up the iOS project in XCode when using CraftAR SDKs

icon Date Developer Guide

icon Date Dec 22, 2020

icon author Catchoom Team

icon folder , , , ,

Our SDKs are distributed as a .framework that you can directly drag into your project. It has some dependencies on frameworks/libraries that have to be linked and some compilation settings to be set.

SDK specific instructions

Choose your SDK to see how to integrate it in your project:

Pods libraries

See this section for more information about the Pods.framework included in all the SDKs

Cloud Image Recognition SDK

1. Set the following Framework dependencies:

  • AVFoundation
  • CoreMedia
  • SystemConfiguration
  • MobileCoreServices

2. Import the SDK:

  • Drag the CraftARCloudImageRecognitionSDK.framework (framework library with the CraftAR SDK) to your Project (Link with libraries)
  • Drag the Pods.framework to your Project (Link with libraries).

3. Set the following Project Settings:

  • Set the deployment target to iOS 8.0 or greater.
  • In the Build settings of your project add -ObjC to the Linker Flags

iOS Augmented Reality SDK

1. Set the following Framework dependencies:

  • AVFoundation
  • CoreMedia
  • SystemConfiguration
  • MobileCoreServices
  • QuartzCore
  • AudioToolbox
  • CoreLocation
  • libc++
  • libz

2. Import the SDK:

  • CraftAR Augmented Reality SDK v4 +
    • Drag the CraftARSDKAugmentedRealitySDK.framework to your Project (Link with libraries)
    • Drag the CraftARResourcesAR.bundle to the Copy bundle resources build phase.
    • Drag the Pods.framework to your Project (Link with libraries).

3. Set the following Project Settings:

  • Set the deployment target to iOS 8.0 or greater.
  • In the Packaging section set the Compress PNG files option to No.
  • In the Build settings of your project add -ObjC to the Linker Flags

On-Device Image Recognition SDK

1. Set the following Framework dependencies:

  • AVFoundation
  • CoreMedia
  • CoreFoundation
  • SystemConfiguration
  • MobileCoreServices
  • libc++
  • libz

2. Import the SDK:

  • Drag the CraftAROnDeviceImageRecognitionSDK.framework (framework library with the CraftAR SDK) to your Project (Link Binary With Libraries)
  • Drag the CraftARResourcesODIR.bundle (bundle resources for the SDK) to the Copy bundle resources build phase.
  • Drag the Pods.framework to your Project (Link with libraries).

3. Set the following Project Settings:

  • In the Build settings of your project add -ObjC to the Linker Flags
  • Set the deployment target to iOS 8.0 or greater.

CraftAR Pro SDK

1. Set the following Framework dependencies:

  • AVFoundation
  • CoreMedia
  • CoreFoundation
  • SystemConfiguration
  • MobileCoreServices
  • QuartzCore
  • AudioToolbox
  • CoreLocation
  • libc++
  • libz

2. Import the SDK:

  • Drag the CraftARProSDK.framework (framework library with the CraftAR SDK) to your Project (Link Binary With Libraries)
  • Drag the CraftARResourcesODIR.bundle (bundle resources for the SDK) to the Copy bundle resources build phase.
  • Drag the CraftARResourcesAR.bundle to the Copy bundle resources build phase.
  • Drag the Pods.framework to your Project (Link with libraries).

3. Set the following Project Settings:

  • In the Build settings of your project add -ObjC to the Linker Flags
  • Set the deployment target to iOS 8.0 or greater.

Pods Framework

The Pods.framework includes the Network library used by the CraftARSDK. We provide a compiled version from the AFNetworking project, version 3.1.0​

If you are using cocoa pods in your project, you can remove the framework and add the dependencies to your Podfile this is how ours looks like the following:

Related Posts in Developer Guide