iOS SDK Installation
Install the Told SDK in your iOS application to display in-app surveys.
- iOS 14.0+
- Swift 5.9+
- A source created for your iOS app
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 via CocoaPods and Swift Package Manager (SPM).
CocoaPods — add the following line to your Podfile:
pod 'Told'
Swift Package Manager — add the package in Xcode via File → Add Package Dependencies with the URL:
https://github.com/evoltio/told_sdk-ios.git
Click Copy code to copy the dependency directly from the dashboard.
3. Install Told
CocoaPods — run the install command from your project directory:
pod install
SPM — Xcode resolves the package automatically after adding it.
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 {
let configuration = ToldConfiguration(
sourceId: "YOUR_SOURCE_ID",
applicationId: Bundle.main.bundleIdentifier ?? "",
environment: .production,
appVersion: Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0"
)
Told.initSDK(configuration)
return true
}
}
| Parameter | Type | Description |
|---|---|---|
sourceId | String | Your source ID from the Told dashboard |
applicationId | String | Your app's bundle identifier |
environment | ToldEnvironment | .production, .preproduction, or .development |
appVersion | String | Your app version |
preview | Bool | Enable preview mode (optional, defaults to false) |
Installation methods
The dashboard wizard installs Told via CocoaPods. Alternative installation methods are documented separately:
- CocoaPods — the method shown in the dashboard
- Swift Package Manager
Verify installation
Run your app and use the debug function:
Told.debugWidget()
This logs diagnostic information at the info log level. You can also provide a custom log handler at initialization:
Told.initSDK(configuration, logHandler: myLogHandler, debug: true)