Swiftpack.co - FeatureProbe/client-sdk-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by FeatureProbe.
FeatureProbe/client-sdk-ios 1.0.1
iOS SwiftPM and Cocoapods repo
⭐️ 2
🕓 4 weeks ago
.package(url: "https://github.com/FeatureProbe/client-sdk-ios.git", from: "1.0.1")

FeatureProbe iOS-SDK


Currently support two kinds of package manager:

  1. Swift Package Manager XCode -> File -> Add Packages -> input https://github.com/FeatureProbe/client-sdk-ios.git

  2. 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

  1. install uniffi codegen tool

cargo install uniffi_bindgen

  1. install rust android target

rustup target add aarch64-apple-ios rustup target add aarch64-apple-ios-sim rustup target add x86_64-apple-ios

  1. build xcframework


  1. push to git
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.


Stars: 2
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Related Packages

Release Notes

4 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics