Currently support two kinds of package manager:
Swift Package Manager
XCode -> File -> Add Packages -> input https://github.com/FeatureProbe/client-sdk-ios.git
Cocoapods
add pod 'FeatureProbe', :git => 'git@github.com:FeatureProbe/client-sdk-ios.git'
to Podfile
pod install
or pod update
import FeatureProbe
let url = FpUrlBuilder(remoteUrl: "remote_url").build();
let user = FpUser(key: "key123")
user.setAttr(key: "city", value: "1")
let config = FpConfig(
remoteUrl: url!,
clientSdkKey: "client-9d885a68ca2955dfb3a7c95435c0c4faad70b50d",
refreshInterval: 10,
waitFirstResp: true
)
let fp = FeatureProbe(config: config, user: user)
let toggleValue = fp.stringDetail(key: "ab_test", defaultValue: "red")
print("toogle value is \(toggleValue)")
#import "FeatureProbe-Swift.h"
NSString *urlStr = @"remote_url";
FpUrl *url = [[[FpUrlBuilder alloc] initWithRemoteUrl: urlStr] build];
FpUser *user = [[FpUser alloc] initWithKey:@"user_key"];
FpConfig *config = [[FpConfig alloc] initWithRemoteUrl: url clientSdkKey:@"client-9d885a68ca2955dfb3a7c95435c0c4faad70b50d" refreshInterval: 10 waitFirstResp: true];
FeatureProbe *fp = [[FeatureProbe alloc] initWithConfig:config user:user];
NSString *value = [fp stringValueWithKey:@"ab_test" defaultValue:@"red"];
NSLog(@"value is %@", value);
build from repo: git@github.com:FeatureProbe/client-sdk-mobile.git
cargo install uniffi_bindgen
rustup target add aarch64-apple-ios rustup target add aarch64-apple-ios-sim rustup target add x86_64-apple-ios
./build-xcframework.sh
cd client-sdk-ios
git commit -m 'xxx'
git push origin master
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.
Please read CONTRIBUTING for details on our code of conduct, and the process for taking part in improving FeatureProbe.
link |
Stars: 2 |
Last commit: 3 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics