How to Integrate the Kount Device Data Collector XCFramework Package into an iOS Application

XCFramework is a type of binary library package that allows you to use third-party libraries in your iOS 11 or later applications. Kount has a release of the Device Data Collector (DDC) XCFramework package – which can simplify integrating the DDC into your app. XCFramework packages can be integrated directly into an app that does not use a package manager or uses the Swift Package Manager.

Adding the Kount DDC XCFramework Package Directly

  1. Navigate to Kount iOS SDKs, and then download the kount-ios-sdk project.
  2. In the XCode navigator, click File then Add Files to your Project.
  3. In the kount-ios-sdk project, select KountDataCollector.xcframework.
  4. Select Copy items if needed and Create groups, and then click Add.
  5. Add the folder for touch event related files (for reference) under project target.
    1. Go to the Xcode navigator, click File, and then select Add Files to your Project.
    2. In the kount-ios-sdk project, select KountDataCollectorUniversalLibrary.
    3. Under KountDataCollectorUniversalLibrary, select TouchControls – which contains touch events related files.
    4. Select Copy items if needed and Create groups and then click Add.

For Swift applications:

  1. Create a Bridging Header file, and then add the below line to the file:

        #import “KDataCollector.h”
        #import "KountAnalyticsViewController.h"
        
  2. In the target build settings, open Swift Compiler > General > Objective-C Bridging Header and then add:
    <project-name>-Bridging-Header.h

To validate the framework has been added to your project:

  1. Click on your project in the project navigator to open your project settings.
  2. Select your target, and then open the General tab.
  3. Go to Frameworks > Libraries > Embedded Content settings.
  4. On the newly-added KountDataCollector.xcframework.
  5. Select Embed and Sign.
  6. If you don’t see KountDataCollector.xcframework, you must add it manually:
    1. Click the Plus (+) button.
    2. Select the KountDataCollector.xcframework.
    3. Click Add.
  1.  
Once you have added the KountDataCollector to your project, continue to the second step (runtime implementation).
Was this article helpful?
1 out of 1 found this helpful