SWIFT PACKAGE MANAGER
Installation:
-
Navigate to
File
>Swift Packages
>Add Package Dependency...
. -
Enter the package repository URL:
<https://github.com/evoltio/told_sdk-ios.git>
-
Click
Next
.
Or in your package.swift
dependencies: [
.package(url: "https://github.com/evoltio/told_sdk-ios.git", from: "2.1.0")
],
targets: [
.target(
...
dependencies: [
.product(name: "ToldSDK", package: "told_sdk-ios")
],
)
]
Initialization​
Open your AppDelegate.swift file and add the following lines :
Replace SOURCEID with the actual ID.
//
// AppDelegate.swift
//
import Told
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let configuration: ToldConfiguration = .init(
sourceId: "__SOURCE_ID__",
applicationId: "__APPLICATION_ID__",
environment: .production,
appVersion: "__APP_VERSION__",
preview: false
)
Told.init(configuration)
return true
}
}
After completing these steps, initiate your application. If everything was done correctly, the added bundle ID should be validated, and the status will turn green once the SDK is installed.
It's advisable to test everything thoroughly on your local application initially. Once you're satisfied with its functionality, proceed to update your app in the store with the latest version.