iOS Swift Package Manager Installation
Using Xcode UI
- In Xcode, go to File → Add Package Dependencies
- Enter the package URL:
https://github.com/evoltio/told_sdk-ios.git - Set the version rule to Up to Next Major from
2.1.1 - Click Add Package
- 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.