Skip to content

Commit

Permalink
Release 4.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jg zhu committed Apr 2, 2022
1 parent 24dba39 commit 0eeb69b
Show file tree
Hide file tree
Showing 47 changed files with 137 additions and 125 deletions.
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SensorsAnalyticsSDK"
s.version = "4.2.5"
s.version = "4.2.6"
s.summary = "The official iOS SDK of Sensors Analytics."
s.homepage = "http://www.sensorsdata.cn"
s.source = { :git => 'https://github.com/sensorsdata/sa-sdk-ios.git', :tag => "v#{s.version}" }
Expand Down
128 changes: 64 additions & 64 deletions SensorsAnalyticsSDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/AppPush/SAAppPushManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "SAApplicationDelegateProxy.h"
#import "SASwizzle.h"
#import "SALog.h"
#import "UIApplication+PushClick.h"
#import "UIApplication+SAPushClick.h"
#import "SensorsAnalyticsSDK+Private.h"
#import "SAMethodHelper.h"
#import "SAConfigOptions+AppPush.h"
Expand Down
4 changes: 2 additions & 2 deletions SensorsAnalyticsSDK/AppPush/SAApplicationDelegateProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

#import "SAApplicationDelegateProxy.h"
#import "SAClassHelper.h"
#import "NSObject+DelegateProxy.h"
#import "UIApplication+PushClick.h"
#import "NSObject+SADelegateProxy.h"
#import "UIApplication+SAPushClick.h"
#import "SensorsAnalyticsSDK.h"
#import "SAAppPushConstants.h"
#import "SALog.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#import "SAUNUserNotificationCenterDelegateProxy.h"
#import "SAClassHelper.h"
#import "NSObject+DelegateProxy.h"
#import "NSObject+SADelegateProxy.h"
#import "SAAppPushConstants.h"
#import "SensorsAnalyticsSDK.h"
#import "SALog.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIApplication+PushClick.h
// UIApplication+SAPushClick.h
// SensorsAnalyticsSDK
//
// Created by 陈玉国 on 2021/1/7.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIApplication+PushClick.m
// UIApplication+SAPushClick.m
// SensorsAnalyticsSDK
//
// Created by 陈玉国 on 2021/1/7.
Expand All @@ -22,7 +22,7 @@
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "UIApplication+PushClick.h"
#import "UIApplication+SAPushClick.h"
#import "SAApplicationDelegateProxy.h"
#import <objc/runtime.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UNUserNotificationCenter+AutoTrack.h
// UNUserNotificationCenter+SAPushClick.h
// SensorsAnalyticsSDK
//
// Created by 陈玉国 on 2021/1/7.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UNUserNotificationCenter+AutoTrack.m
// UNUserNotificationCenter+SAPushClick.m
// SensorsAnalyticsSDK
//
// Created by 陈玉国 on 2021/1/7.
Expand All @@ -22,7 +22,7 @@
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "UNUserNotificationCenter+PushClick.h"
#import "UNUserNotificationCenter+SAPushClick.h"
#import "SAUNUserNotificationCenterDelegateProxy.h"

@implementation UNUserNotificationCenter (PushClick)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//

#import "SADelegateProxy.h"
#import "NSObject+DelegateProxy.h"
#import "NSObject+SADelegateProxy.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIScrollView+AutoTrack.h
// UIScrollView+SAAutoTrack.h
// SensorsAnalyticsSDK
//
// Created by 张敏超🍎 on 2019/6/19.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIScrollView+AutoTrack.m
// UIScrollView+SAAutoTrack.m
// SensorsAnalyticsSDK
//
// Created by 张敏超🍎 on 2019/6/19.
Expand All @@ -22,7 +22,7 @@
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "UIScrollView+AutoTrack.h"
#import "UIScrollView+SAAutoTrack.h"
#import "SAScrollViewDelegateProxy.h"
#import <objc/runtime.h>
#import <objc/message.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "SAGestureViewProcessorFactory.h"
#import "SensorsAnalyticsSDK+Private.h"
#import "SAConstants+Private.h"
#import "UIView+AutoTrack.h"
#import "UIView+SAAutoTrack.h"
#import "SAAutoTrackUtils.h"
#import "SAAutoTrackManager.h"

Expand Down
4 changes: 2 additions & 2 deletions SensorsAnalyticsSDK/AutoTrack/AppClick/SAAppClickTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#import "SAConstants.h"
#import "SAValidator.h"
#import "SAAutoTrackUtils.h"
#import "UIView+AutoTrack.h"
#import "UIViewController+AutoTrack.h"
#import "UIView+SAAutoTrack.h"
#import "UIViewController+SAAutoTrack.h"
#import "SAModuleManager.h"
#import "SALog.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIApplication+AutoTrack.h
// UIApplication+SAAutoTrack.h
// SensorsAnalyticsSDK
//
// Created by 王灼洲 on 17/3/22.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIApplication+AutoTrack.m
// UIApplication+SAAutoTrack.m
// SensorsAnalyticsSDK
//
// Created by 王灼洲 on 17/3/22.
Expand All @@ -22,13 +22,13 @@
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "UIApplication+AutoTrack.h"
#import "UIApplication+SAAutoTrack.h"
#import "SALog.h"
#import "SensorsAnalyticsSDK.h"
#import "UIView+AutoTrack.h"
#import "UIView+SAAutoTrack.h"
#import "SAConstants+Private.h"
#import "SensorsAnalyticsSDK+Private.h"
#import "UIViewController+AutoTrack.h"
#import "UIViewController+SAAutoTrack.h"
#import "SAAutoTrackUtils.h"
#import "SAAutoTrackManager.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIView+sa_autoTrack.h
// UIView+SAAutoTrack.h
// SensorsAnalyticsSDK
//
// Created by 向作为 on 2018/6/11.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIView+sa_autoTrack.m
// UIView+SAAutoTrack.m
// SensorsAnalyticsSDK
//
// Created by 向作为 on 2018/6/11.
Expand All @@ -22,7 +22,7 @@
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "UIView+AutoTrack.h"
#import "UIView+SAAutoTrack.h"
#import "SAAutoTrackUtils.h"
#import "SensorsAnalyticsSDK+Private.h"
#import <objc/runtime.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ @implementation SAPageLeaveObject
@interface SAAppPageLeaveTracker ()

@property (nonatomic, copy) NSString *referrerURL;
@property (nonatomic, assign) SAAppLifecycleState appState;

@end

Expand Down Expand Up @@ -78,6 +79,11 @@ - (void)trackPageEnter:(UIViewController *)viewController {
}
NSString *address = [NSString stringWithFormat:@"%p", viewController];
if (self.pageLeaveObjects[address]) {
SAPageLeaveObject *object = self.pageLeaveObjects[address];
if (![object isKindOfClass:[SAPageLeaveObject class]]) {
return;
}
object.timestamp = [[NSDate date] timeIntervalSince1970];
return;
}
SAPageLeaveObject *object = [[SAPageLeaveObject alloc] init];
Expand Down Expand Up @@ -110,8 +116,11 @@ - (void)trackPageLeave:(UIViewController *)viewController {
if (object.referrerURL) {
tempProperties[kSAEventPropertyScreenReferrerUrl] = object.referrerURL;
}
[self trackWithProperties:tempProperties];
[self.pageLeaveObjects removeObjectForKey:address];
if (self.appState == SAAppLifecycleStateEnd || self.appState == SAAppLifecycleStateStartPassively) {
return;
}
[self trackWithProperties:tempProperties];
}

- (void)trackWithProperties:(NSDictionary *)properties {
Expand All @@ -122,6 +131,7 @@ - (void)trackWithProperties:(NSDictionary *)properties {
- (void)appLifecycleStateWillChange:(NSNotification *)notification {
NSDictionary *userInfo = notification.userInfo;
SAAppLifecycleState newState = [userInfo[kSAAppLifecycleNewStateKey] integerValue];
self.appState = newState;
// 冷(热)启动
if (newState == SAAppLifecycleStateStart) {
[self.pageLeaveObjects enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull key, SAPageLeaveObject * _Nonnull obj, BOOL * _Nonnull stop) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#import "SAAppViewScreenTracker.h"
#import "SensorsAnalyticsSDK+Private.h"
#import "UIViewController+AutoTrack.h"
#import "UIViewController+SAAutoTrack.h"
#import "SAAppLifecycle.h"
#import "SAConstants+Private.h"
#import "SAValidator.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIViewController+AutoTrack.h
// UIViewController+SAAutoTrack.h
// SensorsAnalyticsSDK
//
// Created by 王灼洲 on 2017/10/18.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// UIViewController+AutoTrack.m
// UIViewController+SAAutoTrack.m
// SensorsAnalyticsSDK
//
// Created by 王灼洲 on 2017/10/18.
Expand All @@ -23,11 +23,11 @@
#endif


#import "UIViewController+AutoTrack.h"
#import "UIViewController+SAAutoTrack.h"
#import "SensorsAnalyticsSDK.h"
#import "SACommonUtility.h"
#import "SALog.h"
#import "UIView+AutoTrack.h"
#import "UIView+SAAutoTrack.h"
#import "SAAutoTrackManager.h"
#import "SAWeakPropertyContainer.h"
#import <objc/runtime.h>
Expand Down
4 changes: 2 additions & 2 deletions SensorsAnalyticsSDK/AutoTrack/SAAutoTrackManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#import "SAModuleManager.h"
#import "SAAppLifecycle.h"
#import "SALog.h"
#import "UIApplication+AutoTrack.h"
#import "UIViewController+AutoTrack.h"
#import "UIApplication+SAAutoTrack.h"
#import "UIViewController+SAAutoTrack.h"
#import "SASwizzle.h"
#import "SAAppStartTracker.h"
#import "SAAppEndTracker.h"
Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/AutoTrack/SAAutoTrackUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "SAConstants+Private.h"
#import "SACommonUtility.h"
#import "SensorsAnalyticsSDK.h"
#import "UIView+AutoTrack.h"
#import "UIView+SAAutoTrack.h"
#import "SALog.h"
#import "SAAlertController.h"
#import "SAModuleManager.h"
Expand Down
2 changes: 2 additions & 0 deletions SensorsAnalyticsSDK/Core/Builder/SAPresetPropertyObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

#if TARGET_OS_IOS
#import <UIKit/UIKit.h>
#elif TARGET_OS_OSX
#import <AppKit/AppKit.h>
#endif

#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// NSObject+DelegateProxy.h
// NSObject+SADelegateProxy.h
// SensorsAnalyticsSDK
//
// Created by yuqiang on 2020/11/5.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "NSObject+DelegateProxy.h"
#import "NSObject+SADelegateProxy.h"
#import <objc/runtime.h>

static void *const kSANSObjectDelegateOptionalSelectorsKey = (void *)&kSANSObjectDelegateOptionalSelectorsKey;
Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/Core/HookDelegate/SADelegateProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "SAClassHelper.h"
#import "SAMethodHelper.h"
#import "SALog.h"
#import "NSObject+DelegateProxy.h"
#import "NSObject+SADelegateProxy.h"
#import <objc/message.h>

static NSString * const kSANSObjectRemoveObserverSelector = @"removeObserver:forKeyPath:";
Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/Core/HookDelegate/SAMethodHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import <objc/runtime.h>
#import "SALog.h"
#import "SASwizzle.h"
#import "NSObject+DelegateProxy.h"
#import "NSObject+SADelegateProxy.h"

@implementation SAMethodHelper

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// NSString+HashCode.h
// NSString+SAHashCode.h
// SensorsAnalyticsSDK
//
// Created by 王灼洲 on 2017/7/6.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// NSString+HashCode.m
// NSString+SAHashCode.m
// SensorsAnalyticsSDK
//
// Created by 王灼洲 on 2017/7/6.
Expand All @@ -23,7 +23,7 @@
#endif


#import "NSString+HashCode.h"
#import "NSString+SAHashCode.h"

@implementation NSString (HashCode)

Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/Core/Network/SANetwork.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#import "SAModuleManager.h"
#import "SensorsAnalyticsSDK+Private.h"
#import "SensorsAnalyticsSDK.h"
#import "NSString+HashCode.h"
#import "NSString+SAHashCode.h"
#import "SAGzipUtility.h"
#import "SALog.h"
#import "SAJSONUtil.h"
Expand Down
4 changes: 2 additions & 2 deletions SensorsAnalyticsSDK/Core/SAKeyChainItemWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
@implementation SAKeyChainItemWrapper
+ (NSString *)saUdid {
NSDictionary *result = [self fetchPasswordWithAccount:kSAUdidAccount service:kSAService];
NSString *sa_udid = [result objectForKey:(__bridge id)kSecValueData];
return sa_udid;
NSString *udid = [result objectForKey:(__bridge id)kSecValueData];
return udid;
}

+ (NSString *)saveUdid:(NSString *)udid {
Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/Core/SensorsAnalyticsSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#import "SAUserDefaultsStorePlugin.h"
#import "SASessionProperty.h"

#define VERSION @"4.2.5"
#define VERSION @"4.2.6"

void *SensorsAnalyticsQueueTag = &SensorsAnalyticsQueueTag;

Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/Core/Tracker/SAEventFlush.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#endif

#import "SAEventFlush.h"
#import "NSString+HashCode.h"
#import "NSString+SAHashCode.h"
#import "SAGzipUtility.h"
#import "SAModuleManager.h"
#import "SAObject+SAConfigOptions.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#import "SAVisualPropertiesConfig.h"
#import "UIView+SAElementPath.h"
#import "SAVisualizedUtils.h"
#import "UIView+AutoTrack.h"
#import "UIView+SAAutoTrack.h"
#import "SAValidator.h"
#import "SAViewNode.h"

Expand Down
Loading

0 comments on commit 0eeb69b

Please sign in to comment.