Mobile SDKs

iOS SDK

The iOS SDK supports Swift Package Manager install, remote config, install resolve, automatic install events, manual events, and optional Apple Ads AdServices attribution.

Requirements

Use the public Swift package for customer app integrations.

  • iOS 15.0 or newer
  • Xcode 15 or newer
  • Swift 5.9 or newer

Installation

In Xcode, add the public package URL and link the AdbackSDK product.

  1. Open File > Add Package Dependencies.
  2. Enter https://github.com/adback-app/ios-sdk.
  3. Select the latest 0.1.x release.
  4. Add the AdbackSDK product to your app target.
https://github.com/adback-app/ios-sdk

Initialize

Call configure once during app startup. A missing or empty key disables the SDK without crashing the host app.

import AdbackSDK

Adback.configure(apiKey: "adbk_pk_live_...")

// Development builds
Adback.configure(
  apiKey: "adbk_pk_test_...",
  options: .init(
    environment: .development,
    debug: true,
    logLevel: .debug
  )
)

Apple Ads attribution

On iOS 14.3 and newer, Adback can read Apple's AdServices attribution token when you opt in. This does not request App Tracking Transparency permission.

  • The raw token is submitted to the backend for Apple's attribution API.
  • Adback stores only a token hash, status, redacted response metadata, and safe resolved Apple Ads fields.
  • The raw token is not sent on normal SDK event requests.
Adback.enableAppleAdsAttribution()

Troubleshooting

Most setup failures are package, key, platform, or timing issues.

  • Confirm the package URL is https://github.com/adback-app/ios-sdk.
  • Confirm the app target supports iOS 15 or newer.
  • Use a test key for development builds and a live key for App Store builds.
  • Call getAttributionParams after configure; it waits for initial bootstrap when needed.
  • Use flush only in debug flows or tests when you need to wait for pending delivery.