Skip to content

Commit 6dac182

Browse files
committed
Release 0.0.5
1 parent cc9cad9 commit 6dac182

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

SensorsABTest/SABConstants.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#import "SABConstants.h"
2626

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

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

SensorsABTest/SABridge/SABEventTracker.m

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,24 @@ - (void)sensorsabtest_trackEvent:(NSMutableDictionary *)event isSignUp:(BOOL)isS
4444
tempEvent = [event mutableCopy];
4545
}
4646

47+
// 用于移除 properties 中的 loginId, distinctId,anonymousId
48+
NSMutableDictionary *tempProperties = [properties mutableCopy];
49+
4750
// 修改 loginId, distinctId,anonymousId
48-
tempEvent[kSALoginId] = properties[kSABLoginId];
49-
tempEvent[kSADistinctId] = properties[kSABDistinctId];
50-
tempEvent[kSAAnonymousId] = properties[kSABAnonymousId];
51+
if (properties[kSABLoginId]) {
52+
tempEvent[kSALoginId] = properties[kSABLoginId];
53+
tempProperties[kSABLoginId] = nil;
54+
}
5155

52-
// properties 中 移除 loginId, distinctId,anonymousId
53-
NSMutableDictionary *tempProperties = [properties mutableCopy];
54-
tempProperties[kSABLoginId] = nil;
55-
tempProperties[kSABDistinctId] = nil;
56-
tempProperties[kSABAnonymousId] = nil;
56+
if (properties[kSABDistinctId]) {
57+
tempEvent[kSADistinctId] = properties[kSABDistinctId];
58+
tempProperties[kSABDistinctId] = nil;
59+
}
60+
61+
if (properties[kSABAnonymousId]) {
62+
tempEvent[kSAAnonymousId] = properties[kSABAnonymousId];
63+
tempProperties[kSABAnonymousId] = nil;
64+
}
5765

5866
tempEvent[kSAProperties] = tempProperties;
5967
[self sensorsabtest_trackEvent:tempEvent isSignUp:isSignUp];

SensorsABTesting.podspec

Lines changed: 1 addition & 1 deletion
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 = "0.0.4"
3+
s.version = "0.0.5"
44
s.summary = 'The official iOS 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)