mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-19 01:17:18 +02:00
It is mostly moving the onboarding folders under same directory for more clear project structure.
640 B
640 B
1. Install the SDK
// Instructions to add the Swift SDK can be found at the provided URL:
https://github.com/Unleash/unleash-proxy-client-swift.git
2. Initialize Unleash
import Foundation
import UnleashProxyClientSwift
var unleash = UnleashProxyClientSwift.UnleashClient(
unleashUrl: "<YOUR_API_URL>",
clientKey: "<YOUR_API_TOKEN>",
refreshInterval: 15,
appName: "unleash-onboarding-swift",
context: [:])
unleash.start()
3. Check feature flag status
Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { _ in
print("Is enabled", unleash.isEnabled(name: "<YOUR_FLAG>"))
}