Launch Darkly
Tested with Launch Darkly version 9.12.0 (iOS)
We assume you already have Appfigurate Library and Launch Darkly integrated into your app with the following example remote properties created in the Launch Darkly console:

Add remote properties into your Configuration subclass
Update your configuration subclass to include your remote configuration properties. Provide default values for the properties in the overridden reset method. See also Supported property types.
Swift Configuration example
Objective-C Configuration header example
Objective-C Configuration implementation example
Provide remote configuration values to Appfigurate Library when requested
Appfigurate Library needs to be able to read the current remote flags from Launch Darkly. Copy and paste the following code into your app.
Swift example
Objective-C example
Notify Appfigurate Library when Launch Darkly has received flags
We need to tell Appfigurate Library that Launch Darkly has received flags, so that it can keep your Configuration subclasses remote properties in sync.
Add a call to APLFlushRemoteConfiguration in any existing Launch Darkly start(config, startWaitSeconds, completion) and observeAll(owner, handler) blocks.
Swift example
Add a call to APLFlushRemoteConfiguration in any existing Launch Darkly startWithConfiguration:startWaitSeconds:completion: and observeAllKeysWithOwner:handler: blocks.
Objective-C example
Complete initialisation example
Swift complete initialisation example
Objective-C complete initialisation example
Best practice and usage
Replace all calls to Launch Darkly boolVariation(forKey:defaultValue:), intVariation(forKey:defaultValue:), doubleVariation(forKey:defaultValue), stringVariation(forKey:defaultValue:)
with the following:
Replace all calls to Launch Darkly boolVariationForKey:defaultValue:, intVariationForKey:defaultValue:, doubleVariationForKey:defaultValue, stringVariationForKey:defaultValue:
with the following:
Last updated