Skip to content

Commit 51ef189

Browse files
committed
Release 0.1.5
1 parent 97cb782 commit 51ef189

15 files changed

Lines changed: 486 additions & 52 deletions

Example/Example-iOS/AppDelegate.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ - (void)startSensorsAnalyticsSDKWithConfigOptions:(NSDictionary *)launchOptions
4949
- (void)startSensorsABTest {
5050
SensorsABTestConfigOptions *abtestConfigOptions = [[SensorsABTestConfigOptions alloc] initWithURL:kSABResultsTestURL];
5151
[SensorsABTest startWithConfigOptions:abtestConfigOptions];
52-
}
5352

53+
}
5454

5555
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
5656
if ([[SensorsABTest sharedInstance] handleOpenURL:url]) {
@@ -59,5 +59,4 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
5959
return NO;
6060
}
6161

62-
6362
@end

SensorsABTest.xcodeproj/project.pbxproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
4D9E708A2539793900DE11D6 /* 数据格式说明.md in Resources */ = {isa = PBXBuildFile; fileRef = 4D9E70892539793900DE11D6 /* 数据格式说明.md */; };
5050
4DE5FBCA258C4B3B00F0E18A /* ABTestTests_result.json in Resources */ = {isa = PBXBuildFile; fileRef = 4DE5FBC9258C4B3B00F0E18A /* ABTestTests_result.json */; };
5151
4DE5FBD2258C508B00F0E18A /* SABFetchResultResponseTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DE5FBD1258C508B00F0E18A /* SABFetchResultResponseTests.m */; };
52+
FC2BE2B4272939BD0043C1FA /* SABPropertyValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = FC2BE2B2272939BD0043C1FA /* SABPropertyValidator.m */; };
53+
FC2BE2B5272939BD0043C1FA /* SABPropertyValidator.h in Headers */ = {isa = PBXBuildFile; fileRef = FC2BE2B3272939BD0043C1FA /* SABPropertyValidator.h */; };
54+
FC2BE2B827293A850043C1FA /* SensorsABTestExperiment.m in Sources */ = {isa = PBXBuildFile; fileRef = FC2BE2B627293A850043C1FA /* SensorsABTestExperiment.m */; };
55+
FC2BE2B927293A850043C1FA /* SensorsABTestExperiment.h in Headers */ = {isa = PBXBuildFile; fileRef = FC2BE2B727293A850043C1FA /* SensorsABTestExperiment.h */; settings = {ATTRIBUTES = (Public, ); }; };
56+
FCC0D0AD2730EA8600BA37E2 /* SensorsABTestExperiment+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = FCC0D0AC2730EA8600BA37E2 /* SensorsABTestExperiment+Private.h */; };
5257
/* End PBXBuildFile section */
5358

5459
/* Begin PBXContainerItemProxy section */
@@ -106,6 +111,11 @@
106111
4D9E70892539793900DE11D6 /* 数据格式说明.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "数据格式说明.md"; sourceTree = "<group>"; };
107112
4DE5FBC9258C4B3B00F0E18A /* ABTestTests_result.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ABTestTests_result.json; sourceTree = "<group>"; };
108113
4DE5FBD1258C508B00F0E18A /* SABFetchResultResponseTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SABFetchResultResponseTests.m; sourceTree = "<group>"; };
114+
FC2BE2B2272939BD0043C1FA /* SABPropertyValidator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SABPropertyValidator.m; sourceTree = "<group>"; };
115+
FC2BE2B3272939BD0043C1FA /* SABPropertyValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SABPropertyValidator.h; sourceTree = "<group>"; };
116+
FC2BE2B627293A850043C1FA /* SensorsABTestExperiment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SensorsABTestExperiment.m; sourceTree = "<group>"; };
117+
FC2BE2B727293A850043C1FA /* SensorsABTestExperiment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SensorsABTestExperiment.h; sourceTree = "<group>"; };
118+
FCC0D0AC2730EA8600BA37E2 /* SensorsABTestExperiment+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SensorsABTestExperiment+Private.h"; sourceTree = "<group>"; };
109119
/* End PBXFileReference section */
110120

111121
/* Begin PBXFrameworksBuildPhase section */
@@ -150,6 +160,9 @@
150160
children = (
151161
4D73D5FC254BC6100020E711 /* SensorsABTest.h */,
152162
4D73D607254BC6110020E711 /* SensorsABTest.m */,
163+
FC2BE2B727293A850043C1FA /* SensorsABTestExperiment.h */,
164+
FC2BE2B627293A850043C1FA /* SensorsABTestExperiment.m */,
165+
FCC0D0AC2730EA8600BA37E2 /* SensorsABTestExperiment+Private.h */,
153166
4D73D60E254BC6110020E711 /* SensorsABTestConfigOptions.h */,
154167
4D73D611254BC6110020E711 /* SensorsABTestConfigOptions.m */,
155168
4D73D612254BC6110020E711 /* SensorsABTestConfigOptions+Private.h */,
@@ -229,6 +242,8 @@
229242
4D73D61B254BC6110020E711 /* SABJSONUtils.m */,
230243
4D73D615254BC6110020E711 /* NSString+SABHelper.h */,
231244
4D73D61A254BC6110020E711 /* NSString+SABHelper.m */,
245+
FC2BE2B3272939BD0043C1FA /* SABPropertyValidator.h */,
246+
FC2BE2B2272939BD0043C1FA /* SABPropertyValidator.m */,
232247
);
233248
path = Utils;
234249
sourceTree = "<group>";
@@ -249,12 +264,15 @@
249264
4D73D635254BC6110020E711 /* SABURLUtils.h in Headers */,
250265
4D04037E2657C7820006D84D /* SABSwizzler.h in Headers */,
251266
4D73D61D254BC6110020E711 /* SABNetwork.h in Headers */,
267+
FC2BE2B5272939BD0043C1FA /* SABPropertyValidator.h in Headers */,
252268
4D73D62E254BC6110020E711 /* SensorsABTestConfigOptions.h in Headers */,
253269
4D73D62F254BC6110020E711 /* SABConstants.h in Headers */,
270+
FC2BE2B927293A850043C1FA /* SensorsABTestExperiment.h in Headers */,
254271
4D73D61E254BC6110020E711 /* SensorsABTest.h in Headers */,
255272
4D73D62C254BC6110020E711 /* SABBridge.h in Headers */,
256273
4D73D623254BC6110020E711 /* SABExperimentDataManager.h in Headers */,
257274
4D73D637254BC6110020E711 /* SABValidUtils.h in Headers */,
275+
FCC0D0AD2730EA8600BA37E2 /* SensorsABTestExperiment+Private.h in Headers */,
258276
4D73D625254BC6110020E711 /* SABFileStore.h in Headers */,
259277
4D73D621254BC6110020E711 /* SABManager.h in Headers */,
260278
4D73D636254BC6110020E711 /* SABJSONUtils.h in Headers */,
@@ -368,10 +386,12 @@
368386
4D73D62B254BC6110020E711 /* SABBridge.m in Sources */,
369387
4D73D626254BC6110020E711 /* SABFetchResultResponse.m in Sources */,
370388
4D73D631254BC6110020E711 /* SensorsABTestConfigOptions.m in Sources */,
389+
FC2BE2B4272939BD0043C1FA /* SABPropertyValidator.m in Sources */,
371390
4D73D633254BC6110020E711 /* SABValidUtils.m in Sources */,
372391
4D73D638254BC6110020E711 /* SABURLUtils.m in Sources */,
373392
4D73D630254BC6110020E711 /* SABManager.m in Sources */,
374393
4D73D63A254BC6110020E711 /* SABJSONUtils.m in Sources */,
394+
FC2BE2B827293A850043C1FA /* SensorsABTestExperiment.m in Sources */,
375395
4D73D628254BC6110020E711 /* SensorsABTest.m in Sources */,
376396
4D73D620254BC6110020E711 /* SABRequest.m in Sources */,
377397
4D73D627254BC6110020E711 /* SABExperimentDataManager.m in Sources */,

SensorsABTest/SABConstants.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#import "SABConstants.h"
2626

2727
// 当前版本号
28-
NSString *const kSABLibVersion = @"0.1.4";
28+
NSString *const kSABLibVersion = @"0.1.5";
2929

3030
// SA 最低支持版本
3131
#if TARGET_OS_OSX

SensorsABTest/SABManager.h

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,7 @@
2020

2121
#import <Foundation/Foundation.h>
2222
#import "SensorsABTestConfigOptions.h"
23-
24-
/**
25-
* @abstract
26-
* 获取试验结果方式类型
27-
*
28-
* @discussion
29-
* 获取试验结果方式类型
30-
* SABFetchABTestModeType - 从缓存获取
31-
* SABFetchABTestModeTypeAsync - 异步请求获取
32-
* SABFetchABTestModeTypeFast - 快速获取(优先读缓存,无缓存再异步请求)
33-
*/
34-
typedef NS_ENUM(NSInteger, SABFetchABTestModeType) {
35-
SABFetchABTestModeTypeCache,
36-
SABFetchABTestModeTypeAsync,
37-
SABFetchABTestModeTypeFast
38-
};
23+
#import "SensorsABTestExperiment.h"
3924

4025
NS_ASSUME_NONNULL_BEGIN
4126

@@ -50,12 +35,9 @@ NS_ASSUME_NONNULL_BEGIN
5035
- (instancetype)initWithConfigOptions:(SensorsABTestConfigOptions *)configOptions NS_DESIGNATED_INITIALIZER;
5136

5237
/// 获取试验结果
53-
/// @param type 获取试验结果方式
54-
/// @param paramName 试验参数名
55-
/// @param defaultValue 默认结果
56-
/// @param timeoutInterval 超时时间,单位为秒
38+
/// @param experiment 试验实例对象
5739
/// @param completionHandler 回调返回试验结果
58-
- (void)fetchABTestWithModeType:(SABFetchABTestModeType)type paramName:(NSString *)paramName defaultValue:(id)defaultValue timeoutInterval:(NSTimeInterval)timeoutInterval completionHandler:(void (^)(id _Nullable result))completionHandler;
40+
- (void)fetchABTestWithExperiment:(SensorsABTestExperiment *)experiment completionHandler:(void (^)(id _Nullable result))completionHandler;
5941

6042
@end
6143

SensorsABTest/SABManager.m

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
#import "SensorsABTestConfigOptions+Private.h"
3535
#import "SABRequest.h"
3636
#import "SABJSONUtils.h"
37+
#import "SABPropertyValidator.h"
38+
#import "SensorsABTestExperiment+Private.h"
3739

3840
/// 调用 js 方法名
3941
static NSString * const kSABAppCallJSMethodName = @"window.sensorsdata_app_call_js";
@@ -119,15 +121,13 @@ - (void)appLifecycleStateDidChange:(NSNotification *)sender {
119121
NSDictionary *userInfo = sender.userInfo;
120122
SABAppLifecycleState newState = [userInfo[@"new"] integerValue];
121123
switch (newState) {
122-
case SABAppLifecycleStateStart:{
124+
case SABAppLifecycleStateStart:
123125
// 开启定时更新计时
124126
[self startReloadTimer];
125-
}
126127
break;
127-
case SABAppLifecycleStateEnd:{
128+
case SABAppLifecycleStateEnd:
128129
// 关闭定时更新计时
129130
[self stopReloadTimer];
130-
}
131131
break;
132132
}
133133
}
@@ -231,13 +231,17 @@ - (void)reloadAllABTestResult:(NSNotification *)notification {
231231
}
232232

233233
#pragma mark - fetch ABTest Action
234-
- (void)fetchABTestWithModeType:(SABFetchABTestModeType)type paramName:(NSString *)paramName defaultValue:(id)defaultValue timeoutInterval:(NSTimeInterval)timeoutInterval completionHandler:(void (^)(id _Nullable result))completionHandler {
234+
- (void)fetchABTestWithExperiment:(SensorsABTestExperiment *)experiment completionHandler:(void (^)(id _Nullable result))completionHandler {
235235
if (!completionHandler) {
236236
SABLogWarn(@"Please use a valid completionHandler");
237237
return;
238238
}
239+
240+
NSString *paramName = experiment.paramName;
241+
id defaultValue = experiment.defaultValue;
242+
239243
if (![SABValidUtils isValidString:paramName]) {
240-
if (type == SABFetchABTestModeTypeCache) {
244+
if (experiment.modeType == SABFetchABTestModeTypeCache) {
241245
completionHandler(defaultValue);
242246
} else {
243247
// fast 和 async 异步接口,统一主线程回调结果
@@ -249,7 +253,7 @@ - (void)fetchABTestWithModeType:(SABFetchABTestModeType)type paramName:(NSString
249253
return;
250254
}
251255

252-
switch (type) {
256+
switch (experiment.modeType) {
253257
case SABFetchABTestModeTypeCache: {
254258
// 从缓存读取
255259
id cacheValue = [self fetchCacheABTestWithParamName:paramName defaultValue:defaultValue];
@@ -263,16 +267,11 @@ - (void)fetchABTestWithModeType:(SABFetchABTestModeType)type paramName:(NSString
263267
});
264268
return;
265269
}
266-
[self fetchAsyncABTestWithParamName:paramName defaultValue:defaultValue timeoutInterval:timeoutInterval completionHandler:completionHandler];
267-
break;
270+
return [self fetchAsyncABTestWithExperiment:experiment completionHandler:completionHandler];
268271
}
269272
case SABFetchABTestModeTypeAsync: {
270-
// 异步请求
271-
[self fetchAsyncABTestWithParamName:paramName defaultValue:defaultValue timeoutInterval:timeoutInterval completionHandler:completionHandler];
272-
break;
273+
return [self fetchAsyncABTestWithExperiment:experiment completionHandler:completionHandler];
273274
}
274-
default:
275-
break;
276275
}
277276
}
278277

@@ -304,15 +303,33 @@ - (nullable id)fetchCacheABTestWithParamName:(NSString *)paramName defaultValue:
304303
}
305304

306305
/// 异步请求获取试验
307-
- (void)fetchAsyncABTestWithParamName:(NSString *)paramName defaultValue:(id)defaultValue timeoutInterval:(NSTimeInterval)timeoutInterval completionHandler:(void (^)(id _Nullable result))completionHandler {
306+
- (void)fetchAsyncABTestWithExperiment:(SensorsABTestExperiment *)experiment completionHandler:(void (^)(id _Nullable result))completionHandler {
307+
308+
NSString *paramName = experiment.paramName;
309+
id defaultValue = experiment.defaultValue;
310+
311+
NSError *error;
312+
// 验证自定义属性合法性,并统一修改自定义属性值为 String 类型
313+
NSDictionary *properties = [SABPropertyValidator validateProperties:experiment.properties error:&error];
314+
if (error) {
315+
SABLogError(@"%@", error.localizedDescription);
316+
dispatch_async(dispatch_get_main_queue(), ^{
317+
completionHandler(defaultValue);
318+
});
319+
return;
320+
}
321+
308322
// 异步请求
309323
SABExperimentRequest *requestData = [[SABExperimentRequest alloc] initWithBaseURL:self.configOptions.baseURL projectKey:self.configOptions.projectKey];
310-
requestData.timeoutInterval = timeoutInterval;
311-
324+
requestData.timeoutInterval = experiment.timeoutInterval;
325+
if (properties.count > 0 && paramName) {
326+
[requestData appendRequestBody:@{@"custom_properties": properties, @"param_name": paramName}];
327+
}
328+
312329
__weak typeof(self) weakSelf = self;
313330
[self.dataManager asyncFetchAllExperimentWithRequest:requestData completionHandler:^(SABFetchResultResponse *_Nullable responseData, NSError *_Nullable error) {
314331
__strong typeof(weakSelf) strongSelf = weakSelf;
315-
332+
316333
if (error || !responseData) {
317334
SABLogError(@"asyncFetchAllExperimentWithRequest failure,error: %@", error);
318335
// 请求失败,主线程回调结果
@@ -321,10 +338,10 @@ - (void)fetchAsyncABTestWithParamName:(NSString *)paramName defaultValue:(id)def
321338
});
322339
return;
323340
}
324-
341+
325342
// 获取缓存并触发 $ABTestTrigger 事件
326343
id cacheValue = [strongSelf fetchCacheABTestWithParamName:paramName defaultValue:defaultValue];
327-
344+
328345
// 切到主线程回调结果
329346
dispatch_async(dispatch_get_main_queue(), ^{
330347
completionHandler(cacheValue ? : defaultValue);

SensorsABTest/SensorsABTest.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#import <Foundation/Foundation.h>
2222
#import "SensorsABTestConfigOptions.h"
23+
#import "SensorsABTestExperiment.h"
2324

2425
NS_ASSUME_NONNULL_BEGIN
2526

@@ -51,6 +52,11 @@ NS_ASSUME_NONNULL_BEGIN
5152
/// @param completionHandler 主线程回调,返回试验结果
5253
- (void)asyncFetchABTestWithParamName:(NSString *)paramName defaultValue:(id)defaultValue timeoutInterval:(NSTimeInterval)timeoutInterval completionHandler:(void (^)(id _Nullable result))completionHandler;
5354

55+
/// 异步从服务端获取最新试验结果
56+
/// @param experiment 获取试验参数
57+
/// @param completionHandler 主线程回调,返回试验结果
58+
- (void)asyncFetchABTestWithExperiment:(SensorsABTestExperiment *)experiment completionHandler:(void (^)(id _Nullable result))completionHandler;
59+
5460
/// 优先从缓存获取试验结果,如果无缓存试验,则异步从网络请求
5561
/// @param paramName 试验参数名
5662
/// @param defaultValue 默认值
@@ -64,6 +70,11 @@ NS_ASSUME_NONNULL_BEGIN
6470
/// @param completionHandler 主线程回调,返回试验结果
6571
- (void)fastFetchABTestWithParamName:(NSString *)paramName defaultValue:(id)defaultValue timeoutInterval:(NSTimeInterval)timeoutInterval completionHandler:(void (^)(id _Nullable result))completionHandler;
6672

73+
/// 优先从缓存获取试验结果,如果无缓存试验,则异步从网络请求
74+
/// @param experiment 获取试验参数
75+
/// @param completionHandler 主线程回调,返回试验结果
76+
- (void)fastFetchABTestWithExperiment:(SensorsABTestExperiment *)experiment completionHandler:(void (^)(id _Nullable result))completionHandler;
77+
6778
/// 处理 url scheme 跳转打开 App
6879
/// @param url URL 参数
6980
/// @return YES/NO 是否为本业务的合法 url

SensorsABTest/SensorsABTest.m

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#import "SensorsABTestConfigOptions+Private.h"
3434
#import "SABRequest.h"
3535
#import "SABSwizzler.h"
36+
#import "SensorsABTestExperiment+Private.h"
3637

3738
static SensorsABTest *sharedABTest = nil;
3839

@@ -89,29 +90,47 @@ - (instancetype)initWithConfigOptions:(nonnull SensorsABTestConfigOptions *)conf
8990
return self;
9091
}
9192

92-
#pragma mark - fetch ABTest API
93+
#pragma mark - Cache Method
9394
- (nullable id)fetchCacheABTestWithParamName:(NSString *)paramName defaultValue:(id)defaultValue {
9495
__block id resultValue = defaultValue;
95-
[self.manager fetchABTestWithModeType:SABFetchABTestModeTypeCache paramName:paramName defaultValue:defaultValue timeoutInterval:kSABFetchABTestResultDefaultTimeoutInterval completionHandler:^(id _Nullable result) {
96+
SensorsABTestExperiment *experiment = [SensorsABTestExperiment experimentWithParamName:paramName defaultValue:defaultValue];
97+
experiment.modeType = SABFetchABTestModeTypeCache;
98+
[self.manager fetchABTestWithExperiment:experiment completionHandler:^(id _Nullable result) {
9699
resultValue = result;
97100
}];
98101
return resultValue;
99102
}
100103

104+
#pragma mark - Async Methods
101105
- (void)asyncFetchABTestWithParamName:(NSString *)paramName defaultValue:(id)defaultValue completionHandler:(void (^)(id _Nullable result))completionHandler {
102-
[self asyncFetchABTestWithParamName:paramName defaultValue:defaultValue timeoutInterval:kSABFetchABTestResultDefaultTimeoutInterval completionHandler:completionHandler];
106+
[self asyncFetchABTestWithExperiment:[SensorsABTestExperiment experimentWithParamName:paramName defaultValue:defaultValue] completionHandler:completionHandler];
103107
}
104108

105109
- (void)asyncFetchABTestWithParamName:(NSString *)paramName defaultValue:(id)defaultValue timeoutInterval:(NSTimeInterval)timeoutInterval completionHandler:(void (^)(id _Nullable result))completionHandler {
106-
[self.manager fetchABTestWithModeType:SABFetchABTestModeTypeAsync paramName:paramName defaultValue:defaultValue timeoutInterval:timeoutInterval completionHandler:completionHandler];
110+
SensorsABTestExperiment *experiment = [SensorsABTestExperiment experimentWithParamName:paramName defaultValue:defaultValue];
111+
experiment.timeoutInterval = timeoutInterval;
112+
[self asyncFetchABTestWithExperiment:experiment completionHandler:completionHandler];
107113
}
108114

115+
- (void)asyncFetchABTestWithExperiment:(SensorsABTestExperiment *)experiment completionHandler:(void (^)(id _Nullable result))completionHandler {
116+
experiment.modeType = SABFetchABTestModeTypeAsync;
117+
[self.manager fetchABTestWithExperiment:experiment completionHandler:completionHandler];
118+
}
119+
120+
#pragma mark - Fast Methods
109121
- (void)fastFetchABTestWithParamName:(NSString *)paramName defaultValue:(id)defaultValue completionHandler:(void (^)(id _Nullable result))completionHandler {
110-
[self fastFetchABTestWithParamName:paramName defaultValue:defaultValue timeoutInterval:kSABFetchABTestResultDefaultTimeoutInterval completionHandler:completionHandler];
122+
[self fastFetchABTestWithExperiment:[SensorsABTestExperiment experimentWithParamName:paramName defaultValue:defaultValue] completionHandler:completionHandler];
111123
}
112124

113125
- (void)fastFetchABTestWithParamName:(NSString *)paramName defaultValue:(id)defaultValue timeoutInterval:(NSTimeInterval)timeoutInterval completionHandler:(void (^)(id _Nullable result))completionHandler {
114-
[self.manager fetchABTestWithModeType:SABFetchABTestModeTypeFast paramName:paramName defaultValue:defaultValue timeoutInterval:timeoutInterval completionHandler:completionHandler];
126+
SensorsABTestExperiment *experiment = [SensorsABTestExperiment experimentWithParamName:paramName defaultValue:defaultValue];
127+
experiment.timeoutInterval = timeoutInterval;
128+
[self fastFetchABTestWithExperiment:experiment completionHandler:completionHandler];
129+
}
130+
131+
- (void)fastFetchABTestWithExperiment:(SensorsABTestExperiment *)experiment completionHandler:(void (^)(id _Nullable result))completionHandler {
132+
experiment.modeType = SABFetchABTestModeTypeFast;
133+
[self.manager fetchABTestWithExperiment:experiment completionHandler:completionHandler];
115134
}
116135

117136
#pragma mark action

0 commit comments

Comments
 (0)