Skip to content

Commit

Permalink
Release 4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zhujg-00 committed Oct 29, 2021
1 parent 332136e commit 20aec30
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 86 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.0.0"
s.version = "4.0.1"
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
28 changes: 14 additions & 14 deletions SensorsAnalyticsSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -265,18 +265,18 @@
CB6EBAF622855222003CFBA8 /* SANetworkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CB6EBAF222855222003CFBA8 /* SANetworkTests.m */; };
F211742126E9A72C00D65E19 /* SAApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = F211741F26E9A72B00D65E19 /* SAApplication.h */; };
F211742226E9A72C00D65E19 /* SAApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = F211742026E9A72B00D65E19 /* SAApplication.m */; };
F214CE58249A07DF00A2633D /* SADatabaseUnitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F214CE57249A07DF00A2633D /* SADatabaseUnitTest.m */; };
F22E1B1B26A55C8A0033A748 /* SAAppPageLeaveTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = F22E1B1926A55C8A0033A748 /* SAAppPageLeaveTracker.h */; };
F22E1B1C26A55C8A0033A748 /* SAAppPageLeaveTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = F22E1B1A26A55C8A0033A748 /* SAAppPageLeaveTracker.m */; };
F23CA0052701715E002EEACA /* WKWebView+SABridge.h in Headers */ = {isa = PBXBuildFile; fileRef = F23C9FFE2701715E002EEACA /* WKWebView+SABridge.h */; };
F23CA0072701715E002EEACA /* SAJavaScriptBridgeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F23CA0002701715E002EEACA /* SAJavaScriptBridgeManager.m */; };
F23CA0082701715E002EEACA /* SensorsAnalyticsSDK+JavaScriptBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = F23CA0012701715E002EEACA /* SensorsAnalyticsSDK+JavaScriptBridge.h */; settings = {ATTRIBUTES = (Public, ); }; };
F23CA0092701715E002EEACA /* WKWebView+SABridge.m in Sources */ = {isa = PBXBuildFile; fileRef = F23CA0022701715E002EEACA /* WKWebView+SABridge.m */; };
F23CA00A2701715E002EEACA /* SAJavaScriptBridgeManager.h in Headers */ = {isa = PBXBuildFile; fileRef = F23CA0032701715E002EEACA /* SAJavaScriptBridgeManager.h */; };
F244AE3C26B170F000D8C60B /* UIViewController+SAPageView.h in Headers */ = {isa = PBXBuildFile; fileRef = F244AE3A26B170F000D8C60B /* UIViewController+SAPageView.h */; };
F244AE3D26B170F000D8C60B /* UIViewController+SAPageView.m in Sources */ = {isa = PBXBuildFile; fileRef = F244AE3B26B170F000D8C60B /* UIViewController+SAPageView.m */; };
F26FDDD8270312C400E1DF32 /* SAConfigOptions+AppPush.h in Headers */ = {isa = PBXBuildFile; fileRef = F26FDDD7270312C300E1DF32 /* SAConfigOptions+AppPush.h */; settings = {ATTRIBUTES = (Public, ); }; };
F26FDDDA2703130700E1DF32 /* SAConfigOptions+Exception.h in Headers */ = {isa = PBXBuildFile; fileRef = F26FDDD92703130700E1DF32 /* SAConfigOptions+Exception.h */; settings = {ATTRIBUTES = (Public, ); }; };
F2066972271FFEE10002ABDF /* UIViewController+SAPageLeave.m in Sources */ = {isa = PBXBuildFile; fileRef = F2066970271FFEE10002ABDF /* UIViewController+SAPageLeave.m */; };
F2066973271FFEE10002ABDF /* UIViewController+SAPageLeave.h in Headers */ = {isa = PBXBuildFile; fileRef = F2066971271FFEE10002ABDF /* UIViewController+SAPageLeave.h */; };
F214CE58249A07DF00A2633D /* SADatabaseUnitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F214CE57249A07DF00A2633D /* SADatabaseUnitTest.m */; };
F22E1B1B26A55C8A0033A748 /* SAAppPageLeaveTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = F22E1B1926A55C8A0033A748 /* SAAppPageLeaveTracker.h */; };
F22E1B1C26A55C8A0033A748 /* SAAppPageLeaveTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = F22E1B1A26A55C8A0033A748 /* SAAppPageLeaveTracker.m */; };
F277F5BF25CF9A43009B5CE6 /* SAApplicationDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = F277F5B125CF9A43009B5CE6 /* SAApplicationDelegateProxy.m */; };
F277F5C025CF9A43009B5CE6 /* SAUNUserNotificationCenterDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = F277F5B225CF9A43009B5CE6 /* SAUNUserNotificationCenterDelegateProxy.h */; };
F277F5C125CF9A43009B5CE6 /* SANotificationUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = F277F5B325CF9A43009B5CE6 /* SANotificationUtil.m */; };
Expand Down Expand Up @@ -605,18 +605,18 @@
CB6EBAF222855222003CFBA8 /* SANetworkTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SANetworkTests.m; sourceTree = "<group>"; };
F211741F26E9A72B00D65E19 /* SAApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SAApplication.h; sourceTree = "<group>"; };
F211742026E9A72B00D65E19 /* SAApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SAApplication.m; sourceTree = "<group>"; };
F214CE57249A07DF00A2633D /* SADatabaseUnitTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SADatabaseUnitTest.m; path = SensorsAnalyticsTests/Tracker/SADatabaseUnitTest.m; sourceTree = SOURCE_ROOT; };
F22E1B1926A55C8A0033A748 /* SAAppPageLeaveTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SAAppPageLeaveTracker.h; sourceTree = "<group>"; };
F22E1B1A26A55C8A0033A748 /* SAAppPageLeaveTracker.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SAAppPageLeaveTracker.m; sourceTree = "<group>"; };
F23C9FFE2701715E002EEACA /* WKWebView+SABridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WKWebView+SABridge.h"; sourceTree = "<group>"; };
F23CA0002701715E002EEACA /* SAJavaScriptBridgeManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SAJavaScriptBridgeManager.m; sourceTree = "<group>"; };
F23CA0012701715E002EEACA /* SensorsAnalyticsSDK+JavaScriptBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SensorsAnalyticsSDK+JavaScriptBridge.h"; sourceTree = "<group>"; };
F23CA0022701715E002EEACA /* WKWebView+SABridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "WKWebView+SABridge.m"; sourceTree = "<group>"; };
F23CA0032701715E002EEACA /* SAJavaScriptBridgeManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SAJavaScriptBridgeManager.h; sourceTree = "<group>"; };
F244AE3A26B170F000D8C60B /* UIViewController+SAPageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+SAPageView.h"; sourceTree = "<group>"; };
F244AE3B26B170F000D8C60B /* UIViewController+SAPageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+SAPageView.m"; sourceTree = "<group>"; };
F26FDDD7270312C300E1DF32 /* SAConfigOptions+AppPush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SAConfigOptions+AppPush.h"; sourceTree = "<group>"; };
F26FDDD92703130700E1DF32 /* SAConfigOptions+Exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SAConfigOptions+Exception.h"; sourceTree = "<group>"; };
F2066970271FFEE10002ABDF /* UIViewController+SAPageLeave.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+SAPageLeave.m"; sourceTree = "<group>"; };
F2066971271FFEE10002ABDF /* UIViewController+SAPageLeave.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+SAPageLeave.h"; sourceTree = "<group>"; };
F214CE57249A07DF00A2633D /* SADatabaseUnitTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SADatabaseUnitTest.m; path = SensorsAnalyticsTests/Tracker/SADatabaseUnitTest.m; sourceTree = SOURCE_ROOT; };
F22E1B1926A55C8A0033A748 /* SAAppPageLeaveTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SAAppPageLeaveTracker.h; sourceTree = "<group>"; };
F22E1B1A26A55C8A0033A748 /* SAAppPageLeaveTracker.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SAAppPageLeaveTracker.m; sourceTree = "<group>"; };
F277F5B125CF9A43009B5CE6 /* SAApplicationDelegateProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SAApplicationDelegateProxy.m; sourceTree = "<group>"; };
F277F5B225CF9A43009B5CE6 /* SAUNUserNotificationCenterDelegateProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SAUNUserNotificationCenterDelegateProxy.h; sourceTree = "<group>"; };
F277F5B325CF9A43009B5CE6 /* SANotificationUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SANotificationUtil.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1329,8 +1329,8 @@
children = (
F22E1B1926A55C8A0033A748 /* SAAppPageLeaveTracker.h */,
F22E1B1A26A55C8A0033A748 /* SAAppPageLeaveTracker.m */,
F244AE3A26B170F000D8C60B /* UIViewController+SAPageView.h */,
F244AE3B26B170F000D8C60B /* UIViewController+SAPageView.m */,
F2066971271FFEE10002ABDF /* UIViewController+SAPageLeave.h */,
F2066970271FFEE10002ABDF /* UIViewController+SAPageLeave.m */,
);
path = AppPageLeave;
sourceTree = "<group>";
Expand Down Expand Up @@ -1453,6 +1453,7 @@
A8CC223E2685E50C00E96A03 /* SARemoteConfigModel.h in Headers */,
881A41A0253D7B4F00854F69 /* SensorsAnalyticsSDK+Private.h in Headers */,
A8356DC22656459A00FD64AA /* SensorsAnalyticsSDK+SAAutoTrack.h in Headers */,
F2066973271FFEE10002ABDF /* UIViewController+SAPageLeave.h in Headers */,
A82E8952267D918100475757 /* SAECCPluginEncryptor.h in Headers */,
F277F5C825CF9A43009B5CE6 /* UNUserNotificationCenter+PushClick.h in Headers */,
4DD1282125F87225008C0B1E /* SAVisualizedViewPathProperty.h in Headers */,
Expand Down Expand Up @@ -1506,7 +1507,6 @@
A8356DC82656459A00FD64AA /* SAScrollViewDelegateProxy.h in Headers */,
A8356DBE2656459A00FD64AA /* UIView+AutoTrack.h in Headers */,
4D41D9D325FF7E9300D856F4 /* UIViewController+SAElementPath.h in Headers */,
F244AE3C26B170F000D8C60B /* UIViewController+SAPageView.h in Headers */,
4DD1285325F872A4008C0B1E /* SAVisualizedAbstractMessage.h in Headers */,
4D2D53992591EB2100805141 /* SADatabase.h in Headers */,
F211742126E9A72C00D65E19 /* SAApplication.h in Headers */,
Expand Down Expand Up @@ -1748,6 +1748,7 @@
45A5656B263C174300C9C41B /* SATrackEventObject.m in Sources */,
A8356DC42656459A00FD64AA /* UIApplication+AutoTrack.m in Sources */,
F23CA0072701715E002EEACA /* SAJavaScriptBridgeManager.m in Sources */,
F2066972271FFEE10002ABDF /* UIViewController+SAPageLeave.m in Sources */,
A8356DD22656459A00FD64AA /* SAGestureTargetActionModel.m in Sources */,
A8BCC4DA26872A3F00B72040 /* SADeeplinkManager.m in Sources */,
A8356DBC2656459A00FD64AA /* SAAutoTrackManager.m in Sources */,
Expand Down Expand Up @@ -1816,7 +1817,6 @@
A8CC223A2685E50C00E96A03 /* SARemoteConfigOperator.m in Sources */,
A8356DCC2656459A00FD64AA /* SAGestureTarget.m in Sources */,
4D6AE7FD26086E9300A9CB08 /* SAVisualizedEventCheck.m in Sources */,
F244AE3D26B170F000D8C60B /* UIViewController+SAPageView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#import "SAConstants+Private.h"
#import "SAAppLifecycle.h"
#import "SensorsAnalyticsSDK+Private.h"
#import "SAAutoTrackManager.h"

@interface SAAppPageLeaveTracker ()

Expand Down Expand Up @@ -158,7 +159,18 @@ - (NSDictionary *)propertiesWithURL:(NSString *)currentURL eventProperties:(NSDi
- (BOOL)shouldTrackViewController:(UIViewController *)viewController {
NSDictionary *autoTrackBlackList = [self autoTrackViewControllerBlackList];
NSDictionary *appViewScreenBlackList = autoTrackBlackList[kSAEventNameAppViewScreen];
return ![self isViewController:viewController inBlackList:appViewScreenBlackList];
if ([self isViewController:viewController inBlackList:appViewScreenBlackList]) {
return NO;
}
if (SAAutoTrackManager.defaultManager.configOptions.enableAutoTrackChildViewScreen ||
!viewController.parentViewController ||
[viewController.parentViewController isKindOfClass:[UITabBarController class]] ||
[viewController.parentViewController isKindOfClass:[UINavigationController class]] ||
[viewController.parentViewController isKindOfClass:[UIPageViewController class]] ||
[viewController.parentViewController isKindOfClass:[UISplitViewController class]]) {
return YES;
}
return NO;
}

- (NSMutableDictionary<NSString *,NSMutableDictionary *> *)timestamp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

NS_ASSUME_NONNULL_BEGIN

@interface UIViewController (PageLeave)
@interface UIViewController (SAPageLeave)

- (void)sensorsdata_pageLeave_viewDidAppear:(BOOL)animated;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#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 "UIViewController+SAPageView.h"
#import "UIViewController+SAPageLeave.h"
#import "SAAutoTrackManager.h"


@implementation UIViewController (PageLeave)
@implementation UIViewController (SAPageLeave)

- (void)sensorsdata_pageLeave_viewDidAppear:(BOOL)animated {
SAAppPageLeaveTracker *tracker = [SAAutoTrackManager defaultManager].appPageLeaveTracker;
Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/AutoTrack/SAAutoTrackManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
#import "UIGestureRecognizer+SAAutoTrack.h"
#import "SAGestureViewProcessorFactory.h"
#import "SACommonUtility.h"
#import "UIViewController+SAPageView.h"
#import "SAApplication.h"
#import "SensorsAnalyticsSDK+SAAutoTrack.h"
#import "UIViewController+SAPageLeave.h"

@interface SAAutoTrackManager ()

Expand Down
27 changes: 27 additions & 0 deletions SensorsAnalyticsSDK/ChannelMatch/SAChannelMatchManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,33 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign, getter=isEnable) BOOL enable;
@property (nonatomic, strong) SAConfigOptions *configOptions;

/// 是否采集过激活事件
/// @param disableCallback 根据 disableCallback 获取本地标记 key 值
- (BOOL)isTrackedAppInstallWithDisableCallback:(BOOL)disableCallback;

/// 设置已经采集激活事件标记
/// @param disableCallback 根据 disableCallback 获取本地标记 key 值
- (void)setTrackedAppInstallWithDisableCallback:(BOOL)disableCallback;

/**
* @abstract
* 用于在 App 首次启动时追踪渠道来源,并设置追踪渠道事件的属性。SDK 会将渠道值填入事件属性 $utm_ 开头的一系列属性中。
*
* @param event event 的名称
* @param properties event 的属性
* @param disableCallback 是否关闭这次渠道匹配的回调请求
* @param dynamicProperties 动态公共属性 (需要在切换 serialQueue 前获取)
*/
- (void)trackAppInstall:(NSString *)event properties:(nullable NSDictionary *)properties disableCallback:(BOOL)disableCallback dynamicProperties:(NSDictionary *)dynamicProperties;

/// 调用 track 接口并附加渠道信息
///
/// 注意:这个方法需要在 serialQueue 中调用,保证线程安全
///
/// @param obj 事件对象
/// @param properties 事件属性
- (void)trackChannelWithEventObject:(SABaseEventObject *)obj properties:(nullable NSDictionary *)properties;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 20aec30

Please sign in to comment.