本功能只是平台SDK的扩展功能,需要在接入王牌SDK后使用。
使用本功能前,需要在平台配置实验,
实验配置平台:https://growthbook.aceux.net/
pod 'WPMIDABTestGrowthBook', '1.0.3'
使用时需要:#import
/*** 获取 ABTest 参数** @param key 参数key* @param defaultValue 默认值,获取不到时,使用的默认值* @return 返回分配实验组 对应的参数*/NSString *ABTestParamString = [[MIDABTestFuncManage shareInstance] getABTestParamString:@"login" defaultValue:@"defstr"];
/*** 获取 ABTest 参数** @param key 参数key* @param defaultValue 默认值,获取不到时,使用的默认值* @return 返回分配实验组 对应的参数*/BOOL ABTestParambool = [[MIDABTestFuncManage shareInstance] getABTestParamBoolean:@"login" defaultValue:false];
/*** 获取 ABTest 参数** @param key 参数key* @param defaultValue 默认值,获取不到时,使用的默认值* @return 返回分配实验组 对应的参数*/NSNumber *ABTestParamnum = [[MIDABTestFuncManage shareInstance] getABTestParamNumber:@"login" defaultValue:@1];
用于产品更新属性使用。
配合实验平台配置的属性key使用。如果没有额外设置 可以不使用。
[[MIDABTestFuncManage shareInstance] refreshCache];
