-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ios): user setAttr rename to with function
- Loading branch information
Showing
9 changed files
with
115 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Pod::Spec.new do |s| | ||
s.name = 'FeatureProbe' | ||
s.version = '1.0.1' | ||
s.version = '1.1.0' | ||
s.license = { :type => 'MIT' } | ||
s.homepage = 'https://github.com/FeatureProbe/FeatureProbe' | ||
s.authors = { 'featureprobe' => '[email protected]' } | ||
|
Binary file modified
BIN
+159 KB
(100%)
FeatureProbeFFI.xcframework/ios-arm64/FeatureProbeFFI.framework/FeatureProbeFFI
Binary file not shown.
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
Binary file modified
BIN
+186 KB
(100%)
...ProbeFFI.xcframework/ios-arm64_x86_64-simulator/FeatureProbeFFI.framework/FeatureProbeFFI
Binary file not shown.
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ import FeatureProbe | |
|
||
let url = FpUrlBuilder(remoteUrl: "remote_url").build(); | ||
let user = FpUser(key: "key123") | ||
user.setAttr(key: "city", value: "1") | ||
user.with(key: "city", value: "1") | ||
let config = FpConfig( | ||
remoteUrl: url!, | ||
clientSdkKey: "client-9d885a68ca2955dfb3a7c95435c0c4faad70b50d", | ||
|
@@ -44,6 +44,7 @@ NSLog(@"value is %@", value); | |
``` | ||
## Build | ||
build from repo: `[email protected]:FeatureProbe/client-sdk-mobile.git` | ||
1. install uniffi codegen tool | ||
|
@@ -68,8 +69,26 @@ git commit -m 'xxx' | |
git push origin master | ||
``` | ||
## Unit Testing | ||
```swift | ||
let fp2 = FeatureProbe.newForTest(toggles: "{ \"toggle_1\": true }") | ||
let is_true = fp2.boolValue(key: "toggle_1", defaultValue: false) | ||
assert(is_true == true); | ||
``` | ||
|
||
```objective-c | ||
#import "FeatureProbe-Swift.h" | ||
|
||
NSString *s = @"{ \"ab_test\": \"green\"}"; | ||
FeatureProbe *fp = [[FeatureProbe alloc] initWithTestJson: s]; | ||
NSString *value = [fp stringValueWithKey:@"ab_test" defaultValue:@"red"]; | ||
NSLog(@"value is %@", value); | ||
``` | ||
## Contributing | ||
We are working on continue evolving FeatureProbe core, making it flexible and easier to use. | ||
Development of FeatureProbe happens in the open on GitHub, and we are grateful to the | ||
community for contributing bugfixes and improvements. | ||
|
Oops, something went wrong.