Installation
The Cimka iOS SDK ships as a set of Swift Package Manager library products. Add the core, then add the UI product(s) that match your app.
| Product | import |
Bundle identifier | What it does |
|---|---|---|---|
CimkaCore |
CimkaCore |
com.cimka.core |
Core: init, sessions & identify, trace logger, URLProtocol network logging, crash reporter, device audit & gate |
CimkaUIKit |
CimkaUIKit |
com.cimka.uikit |
Automatic click, screen and lifecycle tracking for UIKit apps — zero per-screen code |
CimkaSwiftUI |
CimkaSwiftUI |
com.cimka.swiftui |
Screen and click tracking helpers for SwiftUI |
CimkaOffline |
CimkaOffline |
com.cimka.offline |
File-backed queue so logs survive network/API failures |
CimkaUIKit, CimkaSwiftUI and CimkaOffline depend on CimkaCore transitively. The public API entry point is the Cimka type, reached via import CimkaCore.
Requirements
Section titled “Requirements”- iOS 15 or higher
- Xcode 15+, Swift 5.9+
- A license key, API key and application id from the Cimka dashboard
The SDK has no third-party dependencies — it uses only Apple frameworks (Foundation, UIKit, SwiftUI, CryptoKit, CoreLocation).
-
Add the package. In Xcode, choose File ▸ Add Package Dependencies…, enter the repository URL, and select Up to Next Major Version from
1.0.0:https://github.com/cimka-resource/cimka-sdk-iosOr in a
Package.swift:Package.swift dependencies: [.package(url: "https://github.com/cimka-resource/cimka-sdk-ios", from: "1.0.0")],targets: [.target(name: "MyApp", dependencies: [.product(name: "CimkaCore", package: "cimka-sdk-ios"),// pick the one matching your UI toolkit (or both).product(name: "CimkaUIKit", package: "cimka-sdk-ios"),.product(name: "CimkaSwiftUI", package: "cimka-sdk-ios"),// optional: queue logs on disk when the network/API is unavailable.product(name: "CimkaOffline", package: "cimka-sdk-ios"),])] -
Add your config file. Add
cimka_config.jsonto your app target’s resources (Copy Bundle Resources) — see Configuration. -
Initialize as early as possible.
MyApp.swift import SwiftUIimport CimkaCoreimport CimkaOffline@mainstruct MyApp: App {init() {Cimka.initialize() // reads cimka_config.json from the bundleCimkaOffline.register() // if you added CimkaOffline}var body: some Scene { WindowGroup { ContentView() } }}AppDelegate.swift import UIKitimport CimkaCoreimport CimkaUIKitimport CimkaOffline@mainclass AppDelegate: UIResponder, UIApplicationDelegate {func application(_ application: UIApplication,didFinishLaunchingWithOptions options: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {Cimka.initialize()CimkaUIKit.register() // automatic screen/click/lifecycle trackingCimkaOffline.register() // optionalreturn true}}
Access
Section titled “Access”The package resolves over Git. If the repository is private to your organization, each developer and CI machine needs read access and must authenticate to GitHub (an SSH key, or a Personal Access Token added under Xcode ▸ Settings ▸ Accounts). Actual use of the SDK is gated by the license credentials in your config file, issued from the dashboard.