-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
25 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,24 +8,21 @@ class ViewController: UIViewController { | |
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
let options = ConfigCatOptions.default | ||
|
||
options.refreshMode = PollingModes.autoPoll(autoPollIntervalInSeconds: 5) | ||
options.hooks.addOnConfigChanged { _ in | ||
self.configChanged() | ||
} | ||
|
||
// Info level logging helps to inspect the feature flag evaluation process. | ||
// Remove this line to avoid too detailed logging in your application. | ||
options.logLevel = .info | ||
|
||
// Creating a user object to identify your user (optional). | ||
options.defaultUser = ConfigCatUser(identifier: "user-id", email: "[email protected]") | ||
|
||
|
||
self.client = ConfigCatClient.get( | ||
sdkKey: "PKDVCLf-Hq-h-kCzMp-L7Q/psuH7BGHoUmdONrzzUOY7A", | ||
options: options | ||
) | ||
sdkKey: "PKDVCLf-Hq-h-kCzMp-L7Q/psuH7BGHoUmdONrzzUOY7A") { options in | ||
options.pollingMode = PollingModes.autoPoll(autoPollIntervalInSeconds: 5) | ||
options.hooks.addOnConfigChanged { _ in | ||
self.configChanged() | ||
} | ||
|
||
// Info level logging helps to inspect the feature flag evaluation process. | ||
// Remove this line to avoid too detailed logging in your application. | ||
options.logLevel = .debug | ||
|
||
// Creating a user object to identify your user (optional). | ||
options.defaultUser = ConfigCatUser(identifier: "user-id", email: "[email protected]") | ||
} | ||
} | ||
|
||
override func didReceiveMemoryWarning() { | ||
|
This file contains 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
This file contains 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