Skip to content

Commit

Permalink
Release 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoyue committed Apr 1, 2021
1 parent 92be75a commit ba0b36a
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 12 deletions.
6 changes: 2 additions & 4 deletions Example/Example/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
#import <SensorsABTest.h>

/// 测试环境,获取试验地址
static NSString* kSABResultsServerURL = @"http://abtesting.saas.debugbox.sensorsdata.cn/api/v2/abtest/online/results?project-key=0a551836f92dc3292be545c748f3f462e2d43bc9";

static NSString* kSABResultsTestServerURL = @"http://abtesting.saas.debugbox.sensorsdata.cn/api/v2/abtest/online/results?project-key=9868E3674EAF7697D779D8CE5F79D789BE40CFD4";
static NSString* kSABResultsTestServerURL = @"http://abtesting.saas.debugbox.sensorsdata.cn/api/v2/abtest/online/results?project-key=1C77D685FC5441F52550B4F5973B340EB693EBB4";

// 测试环境,数据接收地址
static NSString* kSABTestServerURL = @"http://10.120.239.245:8106/sa?project=default";
static NSString* kSABTestServerURL = @"http://10.120.173.133:8106/sa?project=default";

@interface AppDelegate ()

Expand Down
10 changes: 10 additions & 0 deletions Example/Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@
<string>sac69330c5</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>bjtest</string>
<key>CFBundleURLSchemes</key>
<array>
<string>sa80e4dfd7</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2015-2020 Sensors Data Inc.
Copyright 2015-2021 Sensors Data Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- SensorsABTesting (0.0.1):
- SensorsABTesting (0.0.2):
- SensorsAnalyticsSDK (>= 2.1.14)
- SensorsAnalyticsSDK (2.2.2):
- SensorsAnalyticsSDK/Core (= 2.2.2)
Expand All @@ -17,7 +17,7 @@ EXTERNAL SOURCES:
:path: "./"

SPEC CHECKSUMS:
SensorsABTesting: 015d78aa88b4623f423f11a7a719bc4a382d83eb
SensorsABTesting: 2d29ad8116504d049d6376af41b8acdd3bd541dc
SensorsAnalyticsSDK: 104a681e53bde400bb9531d01411a48744e354aa

PODFILE CHECKSUM: 1b7a0cbf6060fbd70740be2419c32c7c419e2660
Expand Down
4 changes: 2 additions & 2 deletions SensorsABTest.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = mh_dylib;
MARKETING_VERSION = 0.1.1;
MARKETING_VERSION = 0.0.2;
PRODUCT_BUNDLE_IDENTIFIER = cn.sensorsdata.SensorsABTest;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -554,7 +554,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = mh_dylib;
MARKETING_VERSION = 0.1.1;
MARKETING_VERSION = 0.0.2;
PRODUCT_BUNDLE_IDENTIFIER = cn.sensorsdata.SensorsABTest;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down
4 changes: 4 additions & 0 deletions SensorsABTest/Network/SABRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ - (NSURLRequest *)request {
request.timeoutInterval = _timeoutInterval;
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];

/* 关闭 Keep-Alive,
此处设置关闭 Keep-Alive,防止频繁连续扫码,后端 TCP 连接可能断开,并且扫码打开 App 此时尚未完全进入前台,NSURLSession 没有自动重试,导致扫码上传白名单可能失败
*/
[request setValue:@"close" forHTTPHeaderField:@"Connection"];
request.HTTPBody = [SABJSONUtils JSONSerializeObject:self.body];

return request;
Expand Down
2 changes: 1 addition & 1 deletion SensorsABTest/SABConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#import "SABConstants.h"

// 当前版本号
NSString *const kSABLibVersion = @"0.0.1";
NSString *const kSABLibVersion = @"0.0.2";

// SA 最低支持版本
NSString *const kSABMinSupportedSALibVersion = @"2.1.14";
Expand Down
2 changes: 1 addition & 1 deletion SensorsABTest/SensorsABTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ - (BOOL)handleOpenURL:(NSURL *)url {
if (![url isKindOfClass:NSURL.class] || ![url.host isEqualToString:@"abtest"]) {
return NO;
}

SABWhiteListRequest *requestData = [[SABWhiteListRequest alloc] initWithOpenURL:url];
[SABNetwork dataTaskWithRequest:requestData.request completionHandler:^(id _Nullable jsonObject, NSError * _Nullable error) {

if (error) {
SABLogWarn(@"upload distinctId failure,error:%@", error);
} else {
Expand Down
2 changes: 1 addition & 1 deletion SensorsABTesting.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'SensorsABTesting'
s.version = "0.0.1"
s.version = "0.0.2"
s.summary = 'The official iOS SDK of Sensors A/B Testing.'
s.homepage = 'http://www.sensorsdata.cn'
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
Expand Down

0 comments on commit ba0b36a

Please sign in to comment.