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
- Navigate to Kount iOS SDKs, and then download the kount-ios-sdk project.
- In the XCode navigator, click File then Add Files to your Project.
- In the
- Select Copy items if needed and Create groups, and then click Add.
- Add the folder for touch event related files (for reference) under project target.
- Go to the Xcode navigator, click File, and then select Add Files to your Project.
- In the
KountDataCollectorUniversalLibrary, select TouchControls – which contains touch events related files.
- Select Copy items if needed and Create groups and then click Add.
For Swift applications:
Create a Bridging Header file, and then add the below line to the file:
#import “KDataCollector.h” #import "KountAnalyticsViewController.h"
- In the target build settings, open Swift Compiler > General > Objective-C Bridging Header and then add:
To validate the framework has been added to your project:
- Click on your project in the project navigator to open your project settings.
- Select your target, and then open the General tab.
- Go to Frameworks > Libraries > Embedded Content settings.
- On the newly-added
- Select Embed and Sign.
- If you don’t see
KountDataCollector.xcframework, you must add it manually:
- Click the Plus (+) button.
- Select the
- Click Add.
KountDataCollectorto your project, continue to the second step (runtime implementation).
- For Objective-C invocation, refer to How to Invoke the Device Data Collector from an Objective-C App using the iOS SDK 4.1.x.
- For Swift invocation, refer to How to Invoke the Device Data Collector from a Swift App using iOS SDK 4.1.x.