Skip to main content

iOS Swift Package Manager Installation

Using Xcode UI

  1. In Xcode, go to File → Add Package Dependencies
  2. Enter the package URL:
    https://github.com/evoltio/told_sdk-ios.git
  3. Set the version rule to Up to Next Major from 2.1.1
  4. Click Add Package
  5. Choose the target to add the package to

Using Package.swift

Add Told to your Package.swift:

dependencies: [
.package(url: "https://github.com/evoltio/told_sdk-ios.git", from: "2.1.1")
]

Then add it as a dependency to your target:

targets: [
.target(
name: "MyApp",
dependencies: ["Told"]
)
]

Initialize

In your AppDelegate.swift:

import Told

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)

See iOS SDK Installation for full setup details.