Skip to content

Commit 8b07b83

Browse files
committed
Release 1.0.5
1 parent 088cc78 commit 8b07b83

File tree

8 files changed

+30
-19
lines changed

8 files changed

+30
-19
lines changed

Example/Example-iOS/AppDelegate.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
static NSString* kSABResultsTestURL = @"http://10.1.131.245:8202/api/v2/abtest/online/results?project-key=D9493739E8353F0917275C992F0C605A31D120AB";
2727

2828
// 测试环境,数据接收地址
29-
static NSString* kSABTestServerURL = @"http://10.129.28.106:8106/sa?project=default";
29+
static NSString* kSABTestServerURL = @"http://10.1.137.85:8106/sa?project=default";
3030

3131
@interface AppDelegate ()
3232

Example/Example-macOS/AppDelegate.m

+9-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323
#import <SensorsABTest.h>
2424

2525

26-
static NSString *const SADefaultServerURL = @"http://10.130.6.4:8106/sa?project=default";
27-
2826
/// 测试环境,获取试验地址
29-
static NSString* kSABResultsTestURL = @"http://10.129.29.10:8202/api/v2/abtest/online/results?project-key=130EB9E0EE57A09D91AC167C6CE63F7723CE0B22";
27+
static NSString* kSABResultsTestURL = @"http://10.1.131.245:8202/api/v2/abtest/online/results?project-key=D9493739E8353F0917275C992F0C605A31D120AB";
28+
29+
// 测试环境,数据接收地址
30+
static NSString* SADefaultServerURL = @"http://10.1.137.85:8106/sa?project=default";
31+
3032

3133
@interface AppDelegate ()
3234

@@ -46,8 +48,11 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
4648
- (void)startSensorsAnalyticsSDKWithLaunching:(NSNotification *)aNotification {
4749
SAConfigOptions *options = [[SAConfigOptions alloc] initWithServerURL:SADefaultServerURL launchOptions:nil];
4850
options.enableJavaScriptBridge = YES;
51+
52+
#ifdef DEBUG
4953
options.enableLog = YES;
50-
options.flushNetworkPolicy = SensorsAnalyticsNetworkTypeALL;
54+
options.flushNetworkPolicy = SensorsAnalyticsNetworkTypeNONE;
55+
#endif
5156

5257
[SensorsAnalyticsSDK startWithConfigOptions:options];
5358
}

Example/Example-macOS/ViewController.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ - (void)viewDidLoad {
3333
#pragma mark - fetchABTest
3434
#pragma mark STRING
3535
- (IBAction)stringFetchCache:(NSButton *)sender {
36-
NSString *result = [SensorsABTest.sharedInstance fetchCacheABTestWithParamName:@"sringId" defaultValue:@"默认值"];
37-
NSLog(@"fetchCacheABTest STRING experiment,paramName:%@ - result:%@\n", @"sringId", result);
36+
NSString *result = [SensorsABTest.sharedInstance fetchCacheABTestWithParamName:@"device_color" defaultValue:@"默认值"];
37+
NSLog(@"fetchCacheABTest STRING experiment,paramName:%@ - result:%@\n", @"device_color", result);
3838
}
3939

4040
- (IBAction)stringAsyncFetch:(NSButton *)sender {

Example/Example.xcodeproj/project.pbxproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 51;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -176,7 +176,7 @@
176176
4D15CF0F24EE82E0003D2748 /* Sources */,
177177
4D15CF1024EE82E0003D2748 /* Frameworks */,
178178
4D15CF1124EE82E0003D2748 /* Resources */,
179-
9E7C06554C1C8314F56450A5 /* [CP] Embed Pods Frameworks */,
179+
F3FD2B84FC7DEBD9021B33D1 /* [CP] Embed Pods Frameworks */,
180180
);
181181
buildRules = (
182182
);
@@ -287,7 +287,7 @@
287287
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
288288
showEnvVarsInLog = 0;
289289
};
290-
9E7C06554C1C8314F56450A5 /* [CP] Embed Pods Frameworks */ = {
290+
F3FD2B84FC7DEBD9021B33D1 /* [CP] Embed Pods Frameworks */ = {
291291
isa = PBXShellScriptBuildPhase;
292292
buildActionMask = 2147483647;
293293
files = (
@@ -556,7 +556,7 @@
556556
"$(inherited)",
557557
"@executable_path/../Frameworks",
558558
);
559-
MACOSX_DEPLOYMENT_TARGET = 10.12;
559+
MACOSX_DEPLOYMENT_TARGET = 10.13;
560560
MARKETING_VERSION = 1.0.0;
561561
PRODUCT_BUNDLE_IDENTIFIER = "cn.sensorsdata.Example-macOS";
562562
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -581,7 +581,7 @@
581581
"$(inherited)",
582582
"@executable_path/../Frameworks",
583583
);
584-
MACOSX_DEPLOYMENT_TARGET = 10.12;
584+
MACOSX_DEPLOYMENT_TARGET = 10.13;
585585
MARKETING_VERSION = 1.0.0;
586586
PRODUCT_BUNDLE_IDENTIFIER = "cn.sensorsdata.Example-macOS";
587587
PRODUCT_NAME = "$(TARGET_NAME)";

Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ end
1818

1919

2020
target 'Example-macOS' do
21-
platform :osx, '10.10'
21+
platform :osx, '10.13'
2222
# Comment the next line if you don't want to use dynamic frameworks
2323
use_frameworks!
2424

SensorsABTest/SABConstants.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#import "SABConstants.h"
2626

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

3030
// SA 最低支持版本
3131
NSString *const kSABMinSupportedSALibVersion = @"4.5.6";

SensorsABTest/Store/SABFileStorePlugin.m

+10-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,16 @@
3030
@implementation SABFileStorePlugin
3131

3232
- (NSString *)filePath:(NSString *)key {
33-
NSString *newKey = [key stringByReplacingOccurrencesOfString:self.type withString:@""];
34-
NSString *filename = [NSString stringWithFormat:@"sensorsanalytics-abtest-%@.plist", newKey];
35-
NSString *filepath = [[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:filename];
36-
return filepath;
33+
NSString *newKey = [key stringByReplacingOccurrencesOfString:kSABFileStorePluginType withString:@""];
34+
35+
#if TARGET_OS_OSX
36+
NSString *appId = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"];
37+
NSString *fileName = [NSString stringWithFormat:@"sensorsanalytics-abtest-%@-%@.plist", appId, newKey];
38+
#else
39+
NSString *fileName = [NSString stringWithFormat:@"sensorsanalytics-abtest-%@.plist", newKey];
40+
#endif
41+
NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:fileName];
42+
return filePath;
3743
}
3844

3945
#pragma mark - SAStorePlugin

SensorsABTesting.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'SensorsABTesting'
3-
s.version = "1.0.4"
3+
s.version = "1.0.5"
44
s.summary = 'The official iOS/macOS SDK of Sensors A/B Testing.'
55
s.homepage = 'http://www.sensorsdata.cn'
66
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }

0 commit comments

Comments
 (0)