Skip to main content
Latest SDK versions: Web 2.5.0 · Android 2.4.0 · iOS 1.3.0 · React Native 1.2.0View changelog
This guide walks you through displaying a clickwrap agreement in an iOS app and verifying the result on your backend.

Prerequisites

  1. A ClickTerm account
  2. A published template with an effective version (see Product Guide)
  3. An integration with your App ID and App Key (from Integrations)
  4. iOS 15.0+, Swift 5.9+, and Xcode 15.0+
Need to set up your credentials and template first? See Creating an app & template.

1. Add the SDK

Choose Swift Package Manager or add the XCFramework directly. Both options use the same prebuilt SDK from the ClickTerm CDN and do not require access to the SDK source repository.
Create a small local package with this Package.swift:
Package.swift
In Xcode, choose File → Add Package Dependencies… → Add Local…, select the package folder, and add the ClicktermSDK product to your app target.
For checksum verification and detailed setup, see iOS SDK installation.

2. Initialize the SDK

Initialize ClickTerm once when your app starts:
Get your App ID from the Integrations page in the ClickTerm Dashboard.
Never expose your App Key in client-side code. The App Key is used only for backend verification calls. The client SDK uses only the App ID. Store the App Key safely — it won’t display again after creation, but can be regenerated. Regenerating the key requires updating your backend configuration.
Calling SDK methods before initialization throws ClicktermError.notInitialized.

3. Show the clickwrap

From a visible UIViewController, create the request and present the dialog:
The dialog only appears when a new user action is needed. Requests to display a clickwrap are not counted toward billing. See ClicktermDialog for all results and the accepted-content flow.

4. Verify on your backend

Send the Signature to your server, then verify it with your App ID and App Key:
The response contains clickwrapEventStatus:
  • ACCEPTED — Consent is verified and a Certificate of Acceptance is generated.
  • DECLINED — The event is verified without generating a Certificate of Acceptance.
Requests to /clickwrap/verify are counted toward billing. Implement rate limiting or a Captcha check before this step to prevent abuse.
For the complete backend flow, see Verifying a Signature.

Next steps

iOS SDK reference

Explore the complete native iOS API.

Template placeholders

Add user-specific values to agreements.

Integration flow

Understand how the SDK and backend fit together.