LaunchDarkly is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. Get started using LaunchDarkly today!
This version of the LaunchDarkly SDK has been tested across iOS, macOS, watchOS, and tvOS devices.
The LaunchDarkly iOS SDK requires the following minimum build tool versions:
Tool | Version |
---|---|
Xcode | 11.4+ |
Swift | 5.2+ |
And supports the following device platforms:
Platform | Version |
---|---|
iOS | 10.0 |
watchOS | 3.0 |
tvOS | 10.0 |
macOS | 10.12 |
LaunchDarkly supports multiple methods for installing the library in a project. Once installed, head over to the SDK documentation for complete instructions on getting started with using the SDK.
The Swift Package Manager is a dependency manager integrated into the swift
compiler and Xcode.
To integrate LaunchDarkly into an Xcode project, go to the project editor, and select Swift Packages
. From here hit the +
button and follow the prompts using https://github.com/launchdarkly/ios-client-sdk.git
as the URL.
To include LaunchDarkly in a Swift package, simply add it to the dependencies section of your Package.swift
file. And add the product "LaunchDarkly" as a dependency for your targets.
dependencies: [
.package(url: "https://github.com/launchdarkly/ios-client-sdk.git", .upToNextMinor(from: "5.4.3"))
]
To use the CocoaPods dependency manager to integrate LaunchDarkly into your Xcode project, specify it in your Podfile
:
use_frameworks!
target 'YourTargetName' do
pod 'LaunchDarkly', '~> 5.4'
end
To use the Carthage dependency manager to integrate LaunchDarkly into your Xcode project, specify it in your Cartfile
:
To integrate LaunchDarkly into your Xcode project using Carthage, specify it in your Cartfile
:
github "launchdarkly/ios-client-sdk" ~> 5.4
If you prefer not to use the aforementioned dependency managers, it is possible to integrate the SDK manually.
- On the root folder of the project retreive the SDK by either:
- Adding the SDK as a git submodule with
git submodule add https://github.com/launchdarkly/ios-client-sdk.git
. - OR cloning the SDK with
git clone https://github.com/launchdarkly/ios-client-sdk.git
.
- Adding the SDK as a git submodule with
- Open the new
ios-client-sdk
folder and dragLaunchDarkly.xcodeproj
into the project navigator of your application's Xcode project. It should appear nested within your application's blue project icon. - Select your application project in the project navigator (blue icon) and select your application target under the "Targets" heading in the sidebar. If you have multiple targets, perform the following steps for each target.
- Select the "General" tab, and if necessary expand the subsection "Frameworks, Libraries, and Embedded Content".
- Click the "+" button in the expanded subsection. Under "LaunchDarkly" within the dialog you will see 4 frameworks, select
LaunchDarkly.framework
for iOS, orLaunchDarkly_<platform>
for other platforms.
Check out our documentation for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the complete reference guide for this SDK.
We run integration tests for all our SDKs using a centralized test harness. This approach gives us the ability to test for consistency across SDKs, as well as test networking behavior in a long-running application. These tests cover each method in the SDK, and verify that event sending, flag evaluation, stream reconnection, and other aspects of the SDK all behave correctly.
We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this SDK.
- LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
- Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
- Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
- Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
- Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out our documentation for a complete list.
- Explore LaunchDarkly
- launchdarkly.com for more information
- docs.launchdarkly.com for our documentation and SDK reference guides
- apidocs.launchdarkly.com for our API documentation
- blog.launchdarkly.com for the latest product updates