Skip to main content

iOS SDK Installation

Install the Told SDK in your iOS application to display in-app surveys.

The Installation page in your dashboard

After creating an iOS source, Told brings you to its Installation page (sidebar Settings → Installation). This page is a guided wizard that walks you through the four steps required to set up the SDK.

You can come back to it at any time from the source sidebar.

1. Add application ID

This step asks you to register the application ID (bundle ID) of your iOS app. Enter it in the textbox and click Add (Ajouter).

Once added, the field is replaced by a small table showing the registered application ID, its OS, its status (To be validated) and a link to the documentation.

Each source supports a single application ID at a time.

2. Add Told to dependencies

Told is distributed as a CocoaPods pod. Add the following line to your Podfile:

pod 'Told'

Click Copy code to copy the line directly from the dashboard.

3. Install Told

Run the install command from your project directory:

pod install

This installs the new pod added to your Podfile.

4. Initialize the SDK

The dashboard provides a Swift snippet to initialize the SDK in your AppDelegate. The snippet already contains your Source ID — just paste it as-is.

//
// AppDelegate.swift
//

import Told // <--

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
...
Told.initSDK(projectId: "YOUR_SOURCE_ID") // <--
return true
}
...
}

The init function takes a single parameter, projectId, which is the Source ID shown on the dashboard.

Prerequisites

  • A source created for your iOS app
  • Xcode project with Swift

Installation methods

The dashboard wizard installs Told via CocoaPods. Alternative installation methods are documented separately:

Verify installation

Run your app and use the debug function:

Told.debugWidget()

This logs diagnostic information at the info log level.