Created
January 22, 2022 22:50
-
-
Save malcommac/122beb1a4b1f7e11bdec9f7152030d3f to your computer and use it in GitHub Desktop.
Feature Flag Service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FFService { | |
public let main = FFService() | |
public let user: FlagLoader<UserExperiments> | |
private init() { | |
let fileURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]..appendingPathComponent("user_flags.xml")) | |
user = FlagsLoader(UserExperiments.self, | |
description: .init(name: "User Features", description: "Experimental lab"), | |
providers: [ | |
FirebaseRemoteProvider(), | |
LocalProvider(localURL: fileURL) | |
]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment