Skip to content

Commit

Permalink
Release 4.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoyue committed Mar 20, 2024
1 parent f1192bb commit 618863b
Show file tree
Hide file tree
Showing 47 changed files with 341 additions and 723 deletions.
2 changes: 1 addition & 1 deletion Example/SensorsData/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<string>bj</string>
<key>CFBundleURLSchemes</key>
<array>
<string>sf20191010nb</string>
<string>sa169baa87</string>
</array>
</dict>
</array>
Expand Down
7 changes: 2 additions & 5 deletions 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.6.2"
s.version = "4.7.0"
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 All @@ -14,10 +14,6 @@ Pod::Spec.new do |s|

s.libraries = 'icucore', 'z'

s.resource_bundle = {
'SensorsAnalyticsSDK' => ['SensorsAnalyticsSDK/Resources/PrivacyInfo.xcprivacy']
}

s.subspec '__Store' do |store|
store.source_files = 'SensorsAnalyticsSDK/Store/*.{h,m}'
store.public_header_files = 'SensorsAnalyticsSDK/Store/SABaseStoreManager.h', 'SensorsAnalyticsSDK/Store/SAStorePlugin.h', 'SensorsAnalyticsSDK/Store/SAAESStorePlugin.h'
Expand All @@ -30,6 +26,7 @@ Pod::Spec.new do |s|
base.public_header_files = core_dir + "SensorsAnalyticsSDK.h", core_dir + "SensorsAnalyticsExtension.h", core_dir + "SensorsAnalyticsSDK+Public.h", core_dir + "SASecurityPolicy.h", core_dir + "SAConfigOptions.h", core_dir + "SAConstants.h", core_dir + "PropertyPlugin/SAPropertyPlugin.h"
base.ios.frameworks = 'CoreTelephony'
base.dependency 'SensorsAnalyticsSDK/__Store'
base.resource_bundle = { 'SensorsAnalyticsSDK' => 'SensorsAnalyticsSDK/Resources/**/*'}
end

s.subspec 'Common' do |common|
Expand Down
122 changes: 48 additions & 74 deletions SensorsAnalyticsSDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//
// UIAlertController+SASimilarPath.h
// SAViewElementInfo+AutoTrack.h
// SensorsAnalyticsSDK
//
// Created by 陈玉国 on 2022/8/30.
// Copyright © 2015-2022 Sensors Data Co., Ltd. All rights reserved.
// Created by  储强盛 on 2024/3/5.
// Copyright © 2015-2024 Sensors Data Co., Ltd. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -18,14 +18,22 @@
// limitations under the License.
//


#import <UIKit/UIKit.h>
#import "SAUIViewPathProperties.h"
#import "SAViewElementInfo.h"

NS_ASSUME_NONNULL_BEGIN

@interface UIAlertController (SASimilarPath) <SAUIViewPathProperties>
@interface SAViewElementInfo (AutoTrack)

- (BOOL)isVisualView;

@end


@interface SAAlertElementInfo (AutoTrack)
@end

@interface SAMenuElementInfo (AutoTrack)
@end


NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//
// SAViewElementInfo+AutoTrack.m
// SensorsAnalyticsSDK
//
// Created by  储强盛 on 2024/3/5.
// Copyright © 2015-2024 Sensors Data Co., Ltd. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#if ! __has_feature(objc_arc)
#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 "SAViewElementInfo+AutoTrack.h"
#import "SAAutoTrackManager.h"

@implementation SAViewElementInfo (AutoTrack)

- (BOOL)isVisualView {
if (!self.view.userInteractionEnabled || self.view.alpha <= 0.01 || self.view.isHidden) {
return NO;
}
return [SAAutoTrackManager.defaultManager isGestureVisualView:self.view];
}

@end


@implementation SAAlertElementInfo (AutoTrack)

- (BOOL)isVisualView {
return YES;
}

@end

#pragma mark - Menu Element Type
@implementation SAMenuElementInfo (AutoTrack)

- (BOOL)isVisualView {
// 在 iOS 14 中, 应当圈选 UICollectionViewCell
if ([self.view.superview isKindOfClass:UICollectionViewCell.class]) {
return NO;
}
return YES;
}

@end
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/AutoTrack/AppClick/SAAppClickTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ - (void)autoTrackEventWithScrollView:(UIScrollView *)scrollView atIndexPath:(NSI
[properties addEntriesFromDictionary:dic];

// 解析 Cell
UIView *cell = [SAAutoTrackUtils cellWithScrollView:scrollView selectedAtIndexPath:indexPath];
UIView *cell = [SAUIProperties cellWithScrollView:scrollView andIndexPath:indexPath];
if (!cell) {
return;
}
Expand Down
27 changes: 1 addition & 26 deletions SensorsAnalyticsSDK/AutoTrack/AppClick/UIView+SAAutoTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,14 @@
@interface UIView (AutoTrack) <SAAutoTrackViewProperty>
@end

@interface UILabel (AutoTrack) <SAAutoTrackViewProperty>
@end

@interface UIImageView (AutoTrack) <SAAutoTrackViewProperty>
@end

@interface UISearchBar (AutoTrack) <SAAutoTrackViewProperty>
@end

#pragma mark - UIControl

@interface UIControl (AutoTrack) <SAAutoTrackViewProperty>
@end

@interface UIButton (AutoTrack) <SAAutoTrackViewProperty>
@end

@interface UISwitch (AutoTrack) <SAAutoTrackViewProperty>
@end

@interface UIStepper (AutoTrack) <SAAutoTrackViewProperty>
@end

@interface UISegmentedControl (AutoTrack) <SAAutoTrackViewProperty>
@end


@interface UIPageControl (AutoTrack) <SAAutoTrackViewProperty>
@end

#pragma mark - Cell
@interface UITableViewCell (AutoTrack) <SAAutoTrackCellProperty>
@end

@interface UICollectionViewCell (AutoTrack) <SAAutoTrackCellProperty>
@interface UISlider (AutoTrack) <SAAutoTrackViewProperty>
@end
Loading

0 comments on commit 618863b

Please sign in to comment.