XCFramework is a type of binary library package that allows you to use third-party libraries in your iOS 11 or later applications. The Device Data Collector XCFramework package can simplify integrating the Device Data Collector 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.
-
Navigate to the Device Data Collector iOS SDK on GitHub, and then download the kount-ios-sdk project.
-
In the XCode navigator, select File, then Add Files to your Project.
-
In the
kount-ios-sdk
project, selectKountDataCollector.xcframework
. -
Select Copy items if needed and Create groups, and then select Add.
-
Add the folder for touch events under project target.
-
Go to the Xcode navigator, select File, and then select Add Files to your Project.
-
In the
kount-ios-sdk
project, selectKountDataCollectorUniversalLibrary
. -
Under
KountDataCollectorUniversalLibrary
, select TouchControls. -
Select Copy items if needed and Create groups and then select Add.
-
For Swift applications:
You can create a bridging -header file or import the SDK directly into the Swift file.
-
Create a bridging-header file
-
Import the SDK
Import the SDK into the appropriate Swift file, such as
AppDelegate
orSceneDelegate
.import KountDataCollector
To validate the framework has been added to your project:
-
In the project navigator, open your project settings.
-
Select your target, and then open the General tab.
-
Go to Frameworks > Libraries > Embedded Content settings.
-
On the newly-added
KountDataCollector.xcframework
, select Embed and Sign. -
If you don’t see
KountDataCollector.xcframework
, add it manually.-
Select Plus (+) .
-
Select the
KountDataCollector.xcframework
. -
Select Add.
-
Once you have added the KountDataCollector
to 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.
-
For Swift invocation, refer to How to Invoke the Device Data Collector from a Swift App using iOS SDK.