Installation
Install the Zeta iOS SDK (ZetaKit) using Swift Package Manager, CocoaPods, or prebuilt XCFrameworks. Swift Package Manager is the recommended integration method.
This guide walks you through adding ZetaKit to your Xcode project using your preferred package manager, importing the SDK modules, and registering your app with ZMP.
On this page
- Requirements
- Install via Swift Package Manager
- Install via CocoaPods
- Install via prebuilt XCFramework
- Import modules
- Mobile app registration
Requirements
| Tool | Minimum supported version |
|---|---|
| iOS / iPadOS | 13.0 |
| Swift | 5.10 (Swift 6 compatible) |
| Xcode | 15.3 |
Install via Swift Package Manager
Recommended for new projects.
-
Open your project in Xcode.
-
Select your project in the Project navigator.
-
Select your app target, then open the Package Dependencies tab.
-
Click Add (+).
-
Enter the package URL:
https://gitlab.com/zeta-crm/zetakit-swift -
Select a version rule. Up to Next Major Version is recommended.
-
Click Add Package.
Select SDK products
Choose the products to add to your target.
| Product | Required? | Add to |
|---|---|---|
ZetaCore | Required | App target |
ZetaNotificationService | Optional | Notification Service Extension target only |
Select the required products and click Add Package to complete installation.
Notes
- SDK versions follow Semantic Versioning. Pin versions only if required for stability.
- Each SDK module is independently buildable, allowing minimal integration.
- Add
ZetaNotificationServiceonly to your Notification Service Extension target — never to the main app target.
For details on managing Swift Package dependencies, see Apple's Swift Package Manager documentation.
Install via CocoaPods
Important: CocoaPods is no longer under active development. See the CocoaPods Specs Repo blog post for the latest status. The Zeta iOS SDK will continue to support existing CocoaPods integrations for as long as possible; however, new projects should use Swift Package Manager.
Steps
-
Install CocoaPods if you haven't already:
gem install cocoapods -
Navigate to your project directory in Terminal.
-
Create a
Podfile(if one does not exist):pod init -
Open your
Podfileand add the ZetaKit pods:target 'YourAppTarget' do pod 'ZetaCore' end # Required for rich push notifications # Add only to the Notification Service Extension target (not the app target) target 'YourNotificationServiceExtensionTarget' do pod 'ZetaNotificationService' end -
Install dependencies:
pod install -
Open the
.xcworkspacefile generated by CocoaPods.
Notes
- Do not add
ZetaNotificationServiceto the main app target. - CocoaPods releases follow the same semantic versioning as SPM.
- CocoaPods support may be deprecated in a future major release.
Install via prebuilt XCFramework
Use binary distribution for faster CI builds or restricted environments.
Download
Prebuilt XCFrameworks are available from the public repository:
https://gitlab.com/zeta-crm/zetakit-swift
Download the required XCFrameworks:
ZetaCore.xcframeworkZetaNotificationService.xcframework(extension only)
Add XCFrameworks to Xcode
- Open your Xcode project.
- Select your app target.
- Go to General → Frameworks, Libraries, and Embedded Content.
- Click + and add
ZetaCore.xcframework. - Set Embed & Sign.
For Notification Service Extensions:
- Add
ZetaNotificationService.xcframeworkonly to the extension target.
Import modules
Import the SDK modules where needed. Import names match the product names.
import ZetaCore
// Add the following line to an Objective-C bridging header.
@import ZetaCore;
For Notification Service Extensions:
import ZetaNotificationService
// Add the following line to an Objective-C bridging header.
@import ZetaNotificationService;
Mobile app registration
Follow the Mobile App Registration guide to register your app with ZMP. Registration produces the clientSiteId and clientSecret you pass to ZTConfig during initialization.
During registration, you will need your app's Bundle ID (the value set in your Xcode project under General > Bundle Identifier).
Important: SDK API tokens have write-only access, restricted to updating profiles, tracking events, and logging errors. Refresh tokens are scoped to mobile-specific APIs and cannot access broader platform functionality.
For the complete ZMP portal walkthrough with screenshots, see Mobile app registration.
Next
- Getting Started — initialize the SDK with your
clientSiteIdandclientSecret.
