Skip to main content
You’ll be sending events from your iOS app in three steps.
1

Create an iOS Source

In the Zeotap CDP, create a Source of category App Events with data source iOS Native SDK. From the IMPLEMENTATION DETAILS tab, copy your write_key.Full walkthrough: Create an iOS SDK Source.
2

Add the SDK

Choose the integration method that fits your project.
  1. In Xcode, go to File → Add Packages.
  2. Enter https://github.com/zeotap/ZeotapCollect in the search bar.
  3. Choose Exact Version as the Dependency Rule and select the latest version.
  4. Click Add Package. ZeotapCollect appears under Package Dependencies.
  5. Under Product → Clean Build Folder, then Build.
3

Initialize the SDK in AppDelegate

Import ZeotapCollect and initialize inside didFinishLaunchingWithOptions:
import ZeotapCollect

func application(
  _ application: UIApplication,
  didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
  let collectOptions = CollectOption()
    .writeKey(value: "YOUR_WRITE_KEY")
    .logging(value: false)
    .optout(value: false)
    .build()

  Collect.initialize(option: collectOptions)
  // Or with a callback:
  // Collect.initialize(option: collectOptions) { data in print("\(data)") }
  return true
}
Replace YOUR_WRITE_KEY with the value from the Source.
4

Send your first event

From anywhere in your app:
import ZeotapCollect

Collect.getInstance()?.setPageProperties(["name": "Home"])
Collect.getInstance()?.setEventProperties("view_product", [
  "productName": "test watch",
  "price": "899"
])
To verify, log into the Zeotap CDP, open your iOS Source, and watch the PREVIEW tab for incoming events.For console logs during development, initialize with .logging(value: true).

Next steps

Configure CollectOption

Consent flags, batching, hashing, country, and more.

Capture user identities

Stitch events to profiles using email, phone, login ID, or custom identifiers.

Set up consent

Default opt-in, TCF 2.0, or custom consent.

iOS 14+ ATT

Capture the IDFA via the App Tracking Transparency framework.
Last modified on June 22, 2026