Skip to content

Commit 088cc78

Browse files
committed
Release 1.0.4
1 parent 9cf8b95 commit 088cc78

18 files changed

Lines changed: 50 additions & 7 deletions

Example/Example-iOS/AppDelegate.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#import <SensorsABTest.h>
2424

2525
/// 测试环境,获取试验地址
26-
static NSString* kSABResultsTestURL = @"http://10.129.29.10:8202/api/v2/abtest/online/results?project-key=130EB9E0EE57A09D91AC167C6CE63F7723CE0B22";
26+
static NSString* kSABResultsTestURL = @"http://10.1.131.245:8202/api/v2/abtest/online/results?project-key=D9493739E8353F0917275C992F0C605A31D120AB";
2727

2828
// 测试环境,数据接收地址
2929
static NSString* kSABTestServerURL = @"http://10.129.28.106:8106/sa?project=default";
@@ -58,7 +58,6 @@ - (void)startSensorsAnalyticsSDKWithConfigOptions:(NSDictionary *)launchOptions
5858
options.flushNetworkPolicy = SensorsAnalyticsNetworkTypeNONE;
5959
#endif
6060

61-
6261
[SensorsAnalyticsSDK startWithConfigOptions:options];
6362

6463
}
@@ -67,8 +66,7 @@ - (void)startSensorsABTest {
6766
SensorsABTestConfigOptions *abtestConfigOptions = [[SensorsABTestConfigOptions alloc] initWithURL:kSABResultsTestURL];
6867
[SensorsABTest startWithConfigOptions:abtestConfigOptions];
6968

70-
[SensorsABTest.sharedInstance setCustomIDs:@{@"custom_subject_id":@"iOS自定义主体333"}];
71-
69+
// [SensorsABTest.sharedInstance setCustomIDs:@{@"custom_subject_id":@"iOS自定义主体333"}];
7270
}
7371

7472
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {

Example/Example-iOS/ViewController.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,18 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
7777
case 1: { // asyncFetch
7878
switch (row) {
7979
case 0: { // INTEGER
80+
81+
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
82+
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS"];
83+
84+
NSString *currentDateString = [dateFormatter stringFromDate:[NSDate date]];
85+
NSLog(@"\n asyncFetchAllExperimentWithRequest 开始 %@\n",currentDateString);
86+
8087
[[SensorsABTest sharedInstance] asyncFetchABTestWithParamName:@"color1" defaultValue:@(1111) completionHandler:^(id _Nullable result) {
8188
NSLog(@"asyncFetchABTest,paramName:%@ - result:%@\n", @"color1", result);
89+
90+
NSString *currentDateString1 = [dateFormatter stringFromDate:[NSDate date]];
91+
NSLog(@"\nasyncFetchAllExperimentWithRequest 结束 %@\n",currentDateString1);
8292
}];
8393
}
8494
break;

Package.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// swift-tools-version:5.3
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "SensorsABTest",
7+
platforms: [
8+
.iOS(.v9),
9+
.macOS(.v10_13)
10+
],
11+
products: [
12+
.library(
13+
name: "SensorsABTest",
14+
targets: ["SensorsABTest"]),
15+
],
16+
dependencies: [
17+
.package(name: "SensorsAnalyticsSDK", url: "https://github.com/sensorsdata/sa-sdk-ios-spm.git", from: "4.7.2")
18+
],
19+
targets: [
20+
.target(
21+
name: "SensorsABTest",
22+
dependencies: ["SensorsAnalyticsSDK"],
23+
path: "SensorsABTest",
24+
resources: [.copy("Resources/PrivacyInfo.xcprivacy")],
25+
cSettings: [
26+
.headerSearchPath("."),
27+
.headerSearchPath("DataManager"),
28+
.headerSearchPath("Network"),
29+
.headerSearchPath("SABridge"),
30+
.headerSearchPath("Store"),
31+
.headerSearchPath("Utils"),
32+
]
33+
)
34+
]
35+
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

SensorsABTest/DataManger/SABHitExperimentRecordSources.h renamed to SensorsABTest/DataManager/SABHitExperimentRecordSources.h

File renamed without changes.

SensorsABTest/DataManger/SABHitExperimentRecordSources.m renamed to SensorsABTest/DataManager/SABHitExperimentRecordSources.m

File renamed without changes.

SensorsABTest/DataManger/SABHitExperimentRecordsManager.h renamed to SensorsABTest/DataManager/SABHitExperimentRecordsManager.h

File renamed without changes.

0 commit comments

Comments
 (0)