We've built a simple mobile application that demonstrates how LaunchDarkly's SDK works.
Below, you'll find the build procedure. For more comprehensive instructions, you can visit your Quickstart page or the iOS reference guide.
- Make sure you have Xcode installed
- Run 'pod install' to get the latest iOS client integrated.
- Open
hello-ios.xcworkspace
in Xcode - Set the value of
sdkKey
inAppDelegate.swift
to your LaunchDarkly mobile key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, setfeatureFlagKey
inViewController.swift
to the flag key.
// AppDelegate.swift
private let sdkKey = ""
// ViewController.swift
fileprivate let featureFlagKey = "sample-feature"
You should see the message "The feature flag evaluates to .", the application will run continuously and react to the flag changes in LaunchDarkly.