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
uidoremailId, 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 / iPadOS | 13.0 |
| Swift | 5.10 (Swift 6 compatible) |
| Xcode | 15.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.
- Add the SDK via Swift Package Manager -- use the URL
https://gitlab.com/zeta-crm/zetakit-swiftand select theZetaCoreproduct. - Initialize the SDK inside
application(_:didFinishLaunchingWithOptions:). - 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
clientSecretin 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:
| Module | Purpose | Add to target |
|---|---|---|
ZetaCore | Core SDK: configuration, user identity, event tracking, push tokens, in-app messages, app inbox. Required. | App target |
ZetaNotificationService | Rich 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.
| Module | Binary 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
- Installation -- Swift Package Manager, CocoaPods, and prebuilt XCFrameworks.
- Getting started -- initialize the SDK, configure it, and handle opt-in/out.
- Contact management -- identify users, update properties, track events.
- Push notifications -- device tokens, click tracking, deeplinks, delivery tracking, and rich notifications.
- In-app messaging -- foreground toaster-style messages and email collection.
- App inbox -- persistent, queryable message store.
- API reference -- feature-grouped index of every public type.
- Changelog -- complete API-level changelog for every version.
- Data & privacy --
PrivacyInfo.xcprivacy, ATT, GDPR/CCPA, thread safety. - Versioning & support -- SemVer policy, supported toolchain window, support channels.
Advanced topics
- Logging --
ZTLogger, log levels, log privacy. - Swift 6 readiness -- language modes,
Sendable, strict concurrency. - Push troubleshooting -- sandbox vs production, APNS error codes, common issues.
- Testing and QA -- sandbox setup, test payloads, debug checklist.
