ABFlexConfig
ABFlexConfig is a Swift library that provides a flexible configuration protocol for A/B testing and feature toggles in your applications. It allows you to easily manage and retrieve various types of configuration values.
Features
- Flexibility: Define and retrieve configuration values with ease.
- A/B Testing: Seamlessly integrate A/B testing configurations into your Swift projects.
- Type-Safe: Support for different types of configuration values, including Bool, String, Int64, and Double.
Installation
CocoaPods
pod 'ABFlexConfig'
Usage
1. Adopt the ABFlexConfig Protocol
import ABFlexConfig
class YourConfigManager: ABFlexConfig {
// Implement the required methods...
}
// ...
let configManager = YourConfigManager()
configManager.setup(configProviders: yourConfigProviders)
let boolValue = configManager.getBoolValue(name: "yourBoolConfig", defaultValue: true)
let stringValue = configManager.getStringValue(name: "yourStringConfig", defaultValue: "defaultString")
let longValue = configManager.getLongValue(name: "yourLongConfig", defaultValue: 42)
let doubleValue = configManager.getDoubl
2. Set Up Configurations
// Your implementation of ConfigDefinitionProvider...
let configProviders: [ConfigDefinitionProvider] = [
// Add your configuration providers here...
]
configManager.setup(configProviders: configProviders)
License
ABFlexConfig is released under the MIT license. See LICENSE for more details.