Skip to content

Commit

Permalink
Update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
z4kn4fein committed Oct 18, 2022
1 parent b6cf14b commit 6757833
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 32 deletions.
6 changes: 3 additions & 3 deletions samples/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- ConfigCat (9.1.0)
- ConfigCat (9.2.1)

DEPENDENCIES:
- ConfigCat (from `https://github.com/configcat/swift-sdk.git`, branch `master`)
Expand All @@ -11,11 +11,11 @@ EXTERNAL SOURCES:

CHECKOUT OPTIONS:
ConfigCat:
:commit: 930a092714a221dff28ffd8dc6e2429e04675f9c
:commit: b6cf14bf40abfabca02ffd664224f988c487acde
:git: https://github.com/configcat/swift-sdk.git

SPEC CHECKSUMS:
ConfigCat: 4c01960d968c6505f35b29770e9ba603ad6252af
ConfigCat: af6bc83f5c563981bac349a885c0d26a2b2e8e72

PODFILE CHECKSUM: 9be1ab171ff7511f957624c62897daa13dae8e46

Expand Down
31 changes: 14 additions & 17 deletions samples/ios/configcatsample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions samples/osx/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- ConfigCat (9.1.0)
- ConfigCat (9.2.1)

DEPENDENCIES:
- ConfigCat (from `https://github.com/configcat/swift-sdk.git`, branch `master`)
Expand All @@ -11,11 +11,11 @@ EXTERNAL SOURCES:

CHECKOUT OPTIONS:
ConfigCat:
:commit: 930a092714a221dff28ffd8dc6e2429e04675f9c
:commit: b6cf14bf40abfabca02ffd664224f988c487acde
:git: https://github.com/configcat/swift-sdk.git

SPEC CHECKSUMS:
ConfigCat: 4c01960d968c6505f35b29770e9ba603ad6252af
ConfigCat: af6bc83f5c563981bac349a885c0d26a2b2e8e72

PODFILE CHECKSUM: cefb5b755aab5575d8660d2128a13614655fe285

Expand Down
14 changes: 5 additions & 9 deletions samples/osx/configcatsample-objc/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@

int main(int argc, const char * argv[]) {
@autoreleasepool {
ClientOptions* options = [ConfigCatOptions default];

// Info level logging helps to inspect the feature flag evaluation process.
// Use the default Warning level to avoid too detailed logging in your application.
options.logLevel = LogLevelInfo;

// Initialize the ConfigCatClient with an SDK Key.
ConfigCatClient* client = [ConfigCatClient getWithSdkKey:@"PKDVCLf-Hq-h-kCzMp-L7Q/HhOWfwVtZ0mb30i9wi17GQ"
options:options];
ConfigCatClient* client = [ConfigCatClient getWithSdkKey:@"PKDVCLf-Hq-h-kCzMp-L7Q/HhOWfwVtZ0mb30i9wi17GQ" configurator:^(ConfigCatOptions* options){
// Info level logging helps to inspect the feature flag evaluation process.
// Use the default Warning level to avoid too detailed logging in your application.
options.logLevel = LogLevelInfo;
}];

// Creating a user object to identify your user (optional).
ConfigCatUser* userObject = [[ConfigCatUser alloc]initWithIdentifier:@"Some UserID"
Expand Down

0 comments on commit 6757833

Please sign in to comment.