Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion: Local overrides using launch flags #282

Open
lukeredpath opened this issue Oct 12, 2022 · 1 comment
Open

suggestion: Local overrides using launch flags #282

lukeredpath opened this issue Oct 12, 2022 · 1 comment

Comments

@lukeredpath
Copy link

lukeredpath commented Oct 12, 2022

Is your feature request related to a problem? Please describe.

It can be useful during early development to be able to enable/disable launch flags in local builds without interfering with others. One way could be to set up a specific environment in LaunchDarkly but this might not scale well to bigger teams. With a typical setup of a development and production environment, you may still want to produce local builds that have certain features enabled or disabled without changing things in LaunchDarkly.

Describe the solution you'd like

Because we wrap the LaunchDarkly SDK in a custom client interface in our app, we are able to very easily mock/stub flags in tests but also, we have the ability to enable or disable boolean flags using launch arguments in Xcode schemes.

Given a flag key of my-feature, we can add the launch flag enable-my-feature or disable-my-feature to enable or disable the flag accordingly - any launch flags set this way will override any values from LaunchDarkly regardless of whether targeting is enabled or not.

Describe alternatives you've considered
An alternative would be to make use of multiple temporary environments in LaunchDarkly.

Additional context
It might also be possible to support values besides boolean but for our needs a simple enable/disable toggle for boolean flags was enough for us.

One way we might typically use this is to temporarily add launch flags to our main development scheme in Xcode however if we are working on a bigger feature - usually across lots of small PRs - we will generally add a dedicated scheme for the new feature with the flag overrides enabled which we use during development and then delete once we are done.

@keelerm84
Copy link
Member

My apologies for getting back to you so late. Thank you for this write-up!

I wanted to get your take on something. Some of our server-side SDKs support alternative flag source mechanisms; namely, test data sources and file-based sources.

While we do not currently have any plans to support this in the iOS SDK near term, I am curious if a solution like that might suit your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants