All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added an arrow button to cells on the
FeatureFlagsViewController
which allows the user to view more information about the specific feature flag / test.
- Resolved pull #7 whereby if test variations were specified as
disabled
,enabled
(as opposed toenabled
,disabled
) then test biases would be applied the wrong way round. Thanks to nicolasanjoran for discovering & reporting this issue.
- Updated iOS deployment target to 11.0.
- Updated Package.swift so that UIKit-dependent classes are available where UIKit can be imported.
- Now import
FeatureFlags
rather thanFeatureFlagsPackage
when using SPM. - Dropped support for iOS 8
Fixing TestVariationPickerViewController
background colors in dark mode.
Feature description field now shown on FeatureDetailsViewController
(feature details screen).
Features are now grouped by section on FeatureFlagsViewController
where sections are present.
Fix for broken SPM build due to lack of specifity in Package.swift exclusion rule.
Added ability to tag features with a section. Features may then be filtered by section from FeatureFlagsViewController
settings action sheet.
Added option to filter by feature flag type from FeatureFlagsViewController
action sheet.
New icons for feature flags and experiments (A/B tests and MVT tests).
Fixed constraints in FeatureFlagsTableViewCell
to close additional space where description label is hidden.
Feature flags may now have a description
field in JSON which will display in FeatureFlagsViewController providing more context around what the feature flag is used for.
- Stopped
FeatureFlagsViewController
reloading data by default on open as this prevents the user from inspecting the current state of feature flag by resetting their values. Instead feature flags will only be refreshed ifshouldRefresh
explicitly settrue
or refreshed by user via the UI. Additionally, feature flags will be refreshed in the event thatFeatureFlags.configuration
is nil.
- Fixed an issue with encoding a feature using
Codable
whereby thelabels
property would not be encoded.
- Additional macros
TEST_VARIATION
andUSER_IS_IN_TEST_VARIATION
for interoperability with Objective-C.
- Updated from Swift 4.2 to Swift 5.
- It is now possible to instantiate and add a feature flag programmatically.
- Added method
isNoLongerUnderDevelopment()
which can be used to flush development status of a feature flag when development work on a feature is complete.
- Made
isDevelopment
flag less aggressive so it is possible to return development feature flags to regular feature flags once development complete. Ifis-development
is set in either remote or local configuration then the flag will remain a development flag.
- Fixed an issue whereby feature flags were incorrectly being treated as unlock flags after being retrieved from persistence.
- Fixed a crash in the example app when pressing the action button.
- Added unlock flags which can be used for unlocking (or locking) a feature permanently e.g. after the user has made an in-app purchase or a feature needs to be permanently unlocked programmatically following a certain date. To unlock or lock, optionally specify a default value for
unlocked
in the JSON config and then callunlock()
orlock()
as required. UseisUnlocked()
to check current state.
- Relaxing SwiftLint requirement from an error to a warning as this prevents consumers from building where SwiftLint is not installed.
- Added an option to the
FeatureFlagsViewController
action sheet to refresh features.
- Fixed an edge case issue whereby if a feature flag was not defined in remote configuration but defined locally and then retrieved from disk it would returned as a
Feature On/Off A/B Test
rather than as a standardFeature Flag
.
- Lowered deployment target to iOS 9.0.
- Enabled
Allow app extension API only
in target deployment info. PresentingUIViewController
must now be passed by caller when presentingFeatureFlagsViewController
. - Introduced a
Test.Variation
ofunassigned
for use in the event that a logic error occurs and a test variation cannot be assigned to a feature.
- Now possible to present FeatureFlagsViewController without a close button.
- Fixed an issue where test variation assignments were not stored in the sitatuation where no remote data or cached data present (first launch scenario).
- Swipe to delete on FeatureFlagsViewController now deletes the feature rather than clearing cache now that cache can be cleared via the action button. Note: If the feature is still present in the JSON then it will re-created on refresh.
- Updated refresh completion closures so that they are only invoked after the new configuration information is available.
- Switched method of random number generation from
drand48() * 100
toDouble.random(in: 0..<100.0)
.
- Added
FeatureFlagsUI.autoRefresh
property to automatically refresh data from configuration when the app is foregrounded (defaults tofalse
). - Added ability to clear cache from
FeatureFlagsViewController
. - Added convenience initializer to
Feature
allowing a Feature to be retrieved usingFeature(named: .myFeature)
rather thanFeature.named(.myFeature)
.
- Added function
printFeatureFlags()
for printing flag status. - Added function
printExtendedFeatureFlagInformation()
for printing more detailed flag information. - Boundary tests to ensure user assigned to the correct A/B testing group.
- Fixed an issue where feature flag value could not be toggled through the UI.
- Added support for Swift Package Manager.
- Refactored to satisfy linting rules.
- Added documentation on development flags.
- Fixed an issue where if remote configuration could not be parsed, then fell back to cached configuration without making use of local fallback data in other loadConfiguration(:) method and refactored to eliminate code duplication.
- Support for development flags such that a feature flag can be marked such that the feature is never released unfinished even if remotely enabled later. To mark a feature as in development set the
development
property totrue
in the local fallback configuration.
- Fixed an issue where if remote configuration could not be parsed, then fell back to cached configuration without making use of local fallback data.
- Fixed an issue where an expected error was printed whilst making a fallback parsing attempt.
- Allow for greater granularity in terms of navigation settings when pushing / presenting FeatureFlagsViewController.
- Support for checking whether a feature is enabled in Objective-C using FEATURE_IS_ENABLED macro.
- Made it possible to configure whether feature flag data is refreshed prior to displaying FeatureFlagsViewController.
- Corrections and additional information added to documentation.
- Provided usage documentation.
- Method name (for retrieval of analytics labels) updated from:
public func label(testVariation: Test.Variation) -> String?
To:
public func label(_ testVariation: Test.Variation) -> String?
- Fixed an issue whereby labels and test variations were returned even after a feature was disabled. Once a feature is globally disabled, a user should no longer belong to a test variation (for analytics purposes).
- Ensures that FeatureFlagsViewController refreshes feature flags on load so that information is always up-to-date.
- Fixed a bug which resulted in a crash on swiping to delete a feature which existed in the remote data source and not solely in the cache.
- A local configuration may now be specified as a fallback allowing features to be added locally which are not present in the remote configuration.
- Swipe to delete features from cache using FeatureFlagsViewController.
- Made it possible to refresh configuration by passing data to be parsed directly into the refreshData(:completion:) method.
- Made possible to position FeatureFlagsViewController close button on the left or right-hand side via navigation settings object.
- Fixed an issue whereby it was not possible to toggle A/B groups where test biases set to 0% and 100%.
- Ensured that UITableViewCell labels wrap correctly.
- Ensured that a delegate can be passed into FeatureFlagsViewController.
- FeatureFlagsViewControllerDelegate allows caller to be informed when view controller work is complete.
- Fixes for FeatureFlagsViewController row animations.
- Making scheme shared to support Carthage.
- Initial release.