TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Aug 2016 |
Maintained by Nick Entin.
Flagstaff is a simple feature flagging framework built in Objective-C.
Flagstaff is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Flagstaff', '~> 0.1'
First, you need remote flags to use. Flags must follow the flagstaff v1 schema. For development purposes, the simplest way to do this is to upload json
files to a server and use a url format similar to the following:
FSFlagManager *flagManager = [[FSFlagManager alloc] initWithURLFormat:@"https://example.com/flags/{flag}.json"];
// Check if a flag is enabled
if ([flagManager enableFeatureForKey:@"flag_name"]) {
// The flag is enabled
} else {
// The flag is disabled
}
// Get custom parameters for key
NSDictionary *parameters = [flagManager parametersForKey:@"flag_name"];
NSInteger parameterValue = [[parameters objectForKey:@"param_name"] integerValue];
Nick Entin, [email protected]
Flagstaff is available under the MIT license. See the LICENSE file for more info.
See a bug or have a feature you'd like added? Submit an issue or pull request. Contributions are welcome and appreciated!