Skip to main content
The Klaritics iOS SDK collects analytics from iOS applications and sends them to your self-hosted Klaritics instance. This guide covers Swift Package Manager setup, initialization, and event logging in both Swift and Objective-C.

Installation

Add the SDK via Swift Package Manager (SPM). CocoaPods is not part of the current setup.
  1. In Xcode, choose File → Add Packages.
  2. Enter the Klaritics iOS SDK repository URL.
  3. Add the package to your application target.

Initialization

Call initialize before logging any events, typically in your AppDelegate or app entry point:
The SDK will not initialize until both appId and serverHost are provided.

Logging events

Use logAppEvent to send standard analytics events. The method accepts an event name and an optional dictionary of additional information.

Important naming note

The client-facing class is Klaritics. Do not use KlariticsSDK, KlariticsCore, or any other variant in your application code.