From 6036ece93b52cbc525a6ad48fa9d3a5569c9c828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=80=E6=9C=88?= Date: Fri, 3 Jan 2025 16:41:15 +0800 Subject: [PATCH] Release 1.1.0 --- Example/Example-iOS/AppDelegate.m | 11 ++- .../Example-iOS/Base.lproj/Main.storyboard | 88 ++++++++++++------- Example/Example-iOS/ViewController.m | 26 ++++-- SensorsABTest.xcodeproj/project.pbxproj | 8 +- SensorsABTest/Network/SABRequest.h | 1 - SensorsABTest/Network/SABRequest.m | 2 - SensorsABTest/SABConstants.m | 2 +- SensorsABTest/SABManager.h | 14 +++ SensorsABTest/SABManager.m | 55 +++++++++++- SensorsABTest/SensorsABTest.m | 10 +++ SensorsABTest/SensorsABTestConfigOptions.m | 16 ++++ SensorsABTest/include/SensorsABTest.h | 12 +++ .../include/SensorsABTestConfigOptions.h | 2 + SensorsABTesting.podspec | 6 +- 14 files changed, 196 insertions(+), 57 deletions(-) diff --git a/Example/Example-iOS/AppDelegate.m b/Example/Example-iOS/AppDelegate.m index 18a78c1..0eabbf6 100644 --- a/Example/Example-iOS/AppDelegate.m +++ b/Example/Example-iOS/AppDelegate.m @@ -23,10 +23,10 @@ #import /// 测试环境,获取试验地址 -static NSString* kSABResultsTestURL = @"http://10.1.131.245:8202/api/v2/abtest/online/results?project-key=D9493739E8353F0917275C992F0C605A31D120AB"; +static NSString* kSABResultsTestURL = @"http://10.1.132.85:8202/api/v2/abtest/online/results?project-key=CDF5B1BE9CDCBEB289EA0589066A263D741742BD"; // 测试环境,数据接收地址 -static NSString* kSABTestServerURL = @"http://10.1.137.85:8106/sa?project=default"; +static NSString* kSABTestServerURL = @"http://10.1.132.86:8106/sa?project=default"; @interface AppDelegate () @@ -48,7 +48,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( - (void)startSensorsAnalyticsSDKWithConfigOptions:(NSDictionary *)launchOptions { SAConfigOptions *options = [[SAConfigOptions alloc] initWithServerURL:kSABTestServerURL launchOptions:launchOptions]; // options.autoTrackEventType = SensorsAnalyticsEventTypeAppStart | SensorsAnalyticsEventTypeAppEnd | SensorsAnalyticsEventTypeAppClick | SensorsAnalyticsEventTypeAppViewScreen; - options.autoTrackEventType = SensorsAnalyticsEventTypeAppStart | SensorsAnalyticsEventTypeAppEnd | SensorsAnalyticsEventTypeAppViewScreen; +// options.autoTrackEventType = SensorsAnalyticsEventTypeAppStart | SensorsAnalyticsEventTypeAppEnd | SensorsAnalyticsEventTypeAppViewScreen; options.enableHeatMap = YES; options.enableVisualizedAutoTrack = YES; @@ -60,10 +60,15 @@ - (void)startSensorsAnalyticsSDKWithConfigOptions:(NSDictionary *)launchOptions [SensorsAnalyticsSDK startWithConfigOptions:options]; +// [SensorsAnalyticsSDK.sharedInstance identify:@"cqs_identify_20241230001"]; + + [[SensorsAnalyticsSDK sharedInstance] track:@"test_track" withProperties:@{@"city": @"beijing"}]; + } - (void)startSensorsABTest { SensorsABTestConfigOptions *abtestConfigOptions = [[SensorsABTestConfigOptions alloc] initWithURL:kSABResultsTestURL]; +// abtestConfigOptions.customProperties = @{@"ab_city": @"beijing"}; [SensorsABTest startWithConfigOptions:abtestConfigOptions]; // [SensorsABTest.sharedInstance setCustomIDs:@{@"custom_subject_id":@"iOS自定义主体333"}]; diff --git a/Example/Example-iOS/Base.lproj/Main.storyboard b/Example/Example-iOS/Base.lproj/Main.storyboard index 4f739e6..d142698 100644 --- a/Example/Example-iOS/Base.lproj/Main.storyboard +++ b/Example/Example-iOS/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -12,7 +12,7 @@ - + @@ -377,14 +377,14 @@ - + - + - + + + + + + + + + + + + + + + + + - + - + - + - +