iOS SDK Overview

ZetaKit is the Zeta Marketing Platform (ZMP) SDK for iOS. It gives your app a single integration point for user identity, event tracking, push notifications, in-app messages, and the app inbox.

SDK version: This documentation covers iOS SDK 1.0.0. For earlier versions, see Prior iOS SDK guides.

This guide is for iOS developers integrating the Zeta SDK into a consumer app. It covers what the SDK provides, how to get started, and where to find detailed documentation for each feature.

On this page


Features

  • User identity -- identify users with a uid or emailId, add email and phone contacts, attach custom properties. See Contact management.
  • Event tracking -- auto-tracked lifecycle events, screen-name tracking, and fully custom events. See Contact management.
  • Push notifications -- device-token handoff, click attribution, deeplink delivery, rich media, and delivery tracking via the Notification Service Extension. See Push notifications.
  • In-app messaging -- foreground, opt-in-free, SDK-rendered messages with optional email collection. See In-app messaging.
  • App inbox -- a persistent, queryable store of messages delivered to the user. See App inbox.

Requirements

Minimum
iOS / iPadOS13.0
Swift5.10 (Swift 6 compatible)
Xcode15.3

The SDK binaries are built with the Swift 6 toolchain and work in both Swift 5.x and Swift 6 consumer projects. For details on strict concurrency and Sendable conformance, see Swift 6 readiness.

Quickstart

Get from zero to a tracked event in under five minutes.

  1. Add the SDK via Swift Package Manager -- use the URL https://gitlab.com/zeta-crm/zetakit-swift and select the ZetaCore product.
  2. Initialize the SDK inside application(_:didFinishLaunchingWithOptions:).
  3. Send your first event.
import ZetaCore

func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
    let config = ZTConfig(
        clientSiteId: "your-site-id",
        clientSecret: "your-secret", // load from secure storage
        region: .US,
        appGroupId: "group.com.example.app",
        optIn: true,
        appEnvironment: .PRODUCTION
    )
    ZetaClient.shared.initialize(config: config)

    ZetaClient.shared.event?.send(name: "app_launched")
    return true
}
@import ZetaCore;

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    ZTConfig *config = [[ZTConfig alloc]
        initWithClientSiteId:@"your-site-id"
        clientSecret:@"your-secret" // load from secure storage
        region:ZTRegionUS
        appGroupId:@"group.com.example.app"
        optIn:YES
        appEnvironment:ZTAppEnvironmentPRODUCTION];

    [[ZetaClient shared] initializeWithConfig:config completionBlock:^{}];

    [[ZetaClient shared].event sendWithName:@"app_launched" properties:nil];
    return YES;
}

Important: Do not hardcode clientSecret in your source code. Load it from a secure source (Keychain, remote configuration, or build-time injection) at app launch. See Data & privacy for details.

For full configuration options and opt-in behavior, continue to Getting started.

Modules

ZetaKit ships two independently buildable modules:

ModulePurposeAdd to target
ZetaCoreCore SDK: configuration, user identity, event tracking, push tokens, in-app messages, app inbox. Required.App target
ZetaNotificationServiceRich push notification rendering and delivery tracking. Optional.Notification Service Extension target only

Installation instructions for each package manager are on the Installation page.

SDK module sizes

The table below shows the sizes of each module for version 1.0.0. Binary size is the arm64 device slice; download size is the full XCFramework archive distributed via SPM or direct download.

ModuleBinary size (arm64)Download size (XCFramework)
ZetaCore~997 KB~5.2 MB
ZetaNotificationService~142 KB~684 KB

Note: The sizes above reflect the raw XCFramework archives. The actual footprint added to your app is typically smaller because the App Store applies compression and app thinning before delivering to end users.


Documentation

  1. Installation -- Swift Package Manager, CocoaPods, and prebuilt XCFrameworks.
  2. Getting started -- initialize the SDK, configure it, and handle opt-in/out.
  3. Contact management -- identify users, update properties, track events.
  4. Push notifications -- device tokens, click tracking, deeplinks, delivery tracking, and rich notifications.
  5. In-app messaging -- foreground toaster-style messages and email collection.
  6. App inbox -- persistent, queryable message store.
  7. API reference -- feature-grouped index of every public type.
  8. Changelog -- complete API-level changelog for every version.
  9. Data & privacy -- PrivacyInfo.xcprivacy, ATT, GDPR/CCPA, thread safety.
  10. Versioning & support -- SemVer policy, supported toolchain window, support channels.

Advanced topics