Skip to content

Commit

Permalink
Release 4.5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
王洋洋 committed May 18, 2023
1 parent 519702d commit 48fefdc
Show file tree
Hide file tree
Showing 18 changed files with 14 additions and 53 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.5.8"
s.version = "4.5.9"
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
4 changes: 0 additions & 4 deletions SensorsAnalyticsSDK/AutoTrack/SAAutoTrackResources.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *token;

/// 事件属性
@property (nonatomic, strong) NSMutableDictionary *properties;
@property (atomic, strong) NSMutableDictionary *properties;

// 自定义属性,暂未开放
//@property (nonatomic, strong) NSDictionary *customProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,13 @@ + (NSMutableDictionary *)validProperties:(NSDictionary *)properties validator:(i
if (![properties isKindOfClass:[NSDictionary class]] || ![validator conformsToProtocol:@protocol(SAEventPropertyValidatorProtocol)]) {
return nil;
}

NSDictionary *newProperties = [NSDictionary dictionaryWithDictionary:properties];

NSMutableDictionary *result = [NSMutableDictionary dictionary];
for (id key in properties) {
for (id key in newProperties) {
NSError *error = nil;
id value = [validator sensorsdata_validKey:key value:properties[key] error:&error];
id value = [validator sensorsdata_validKey:key value:newProperties[key] error:&error];
if (error) {
SALogError(@"%@",error.localizedDescription);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 "SAInterceptor.h"

NS_ASSUME_NONNULL_BEGIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ - (void)processWithInput:(SAFlowData *)input completion:(SAFlowDataCompletion)co
[properties removeObjectForKey:kSADeviceIDPropertyPluginAnonymizationID];
}

[object.properties addEntriesFromDictionary:[properties copy]];
// 避免 object.properties 调用 addEntriesFromDictionary 时同时获取 object.properties
NSMutableDictionary *objectProperties = [NSMutableDictionary dictionaryWithDictionary:object.properties];
[objectProperties addEntriesFromDictionary:[properties copy]];
object.properties = objectProperties;

// 从公共属性中更新 lib 节点中的 $app_version 值
NSDictionary *superProperties = [SAPropertyPluginManager.sharedInstance currentPropertiesForPluginClasses:@[SASuperPropertyPlugin.class]];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 "SAInterceptor.h"

NS_ASSUME_NONNULL_BEGIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 "SAInterceptor.h"

NS_ASSUME_NONNULL_BEGIN
Expand Down
4 changes: 0 additions & 4 deletions SensorsAnalyticsSDK/Core/SACoreResources.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
4 changes: 0 additions & 4 deletions SensorsAnalyticsSDK/Core/SAHTTPSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 <Foundation/Foundation.h>
#import "SASecurityPolicy.h"

Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/Core/SensorsAnalyticsSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#import "SALimitKeyManager.h"
#import "NSDictionary+SACopyProperties.h"

#define VERSION @"4.5.8"
#define VERSION @"4.5.9"

void *SensorsAnalyticsQueueTag = &SensorsAnalyticsQueueTag;

Expand Down
4 changes: 0 additions & 4 deletions SensorsAnalyticsSDK/Core/TrackTimer/SATrackTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 <Foundation/Foundation.h>
#import "SAConstants.h"

Expand Down
4 changes: 0 additions & 4 deletions SensorsAnalyticsSDK/Core/Tracker/SAEventRecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
4 changes: 0 additions & 4 deletions SensorsAnalyticsSDK/Core/Tracker/SAEventStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 <Foundation/Foundation.h>
#import "SAEventRecord.h"

Expand Down
4 changes: 0 additions & 4 deletions SensorsAnalyticsSDK/Core/Utils/SADateFormatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
2 changes: 2 additions & 0 deletions SensorsAnalyticsSDK/Exposure/SAExposureDelegateProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)ce
exposureViewObject.state = (exposureViewObject.state == SAExposureViewStateExposing ? SAExposureViewStateExposing : SAExposureViewStateVisible);
exposureViewObject.scrollView = tableView;
exposureViewObject.indexPath = indexPath;
[exposureViewObject exposureConditionCheck];

//invoke original
SEL methodSelector = @selector(tableView:willDisplayCell:forRowAtIndexPath:);
Expand Down Expand Up @@ -85,6 +86,7 @@ - (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICol
exposureViewObject.state = (exposureViewObject.state == SAExposureViewStateExposing ? SAExposureViewStateExposing : SAExposureViewStateVisible);
exposureViewObject.scrollView = collectionView;
exposureViewObject.indexPath = indexPath;
[exposureViewObject exposureConditionCheck];

//invoke original
SEL methodSelector = @selector(collectionView:willDisplayCell:forItemAtIndexPath:);
Expand Down
3 changes: 0 additions & 3 deletions SensorsAnalyticsSDK/Exposure/SAExposureViewObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ - (void)exposureConditionCheck {
if (!self.view) {
return;
}
if (([self.view isKindOfClass:[UITableViewCell class]] || [self.view isKindOfClass:[UICollectionViewCell class]]) && self.state == SAExposureViewStateInvisible) {
return;
}

if (!self.exposureData.config.repeated && self.lastExposure > 0) {
return;
Expand Down
4 changes: 0 additions & 4 deletions SensorsAnalyticsSDK/Visualized/SAVisualizedResources.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
// 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 <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down

0 comments on commit 48fefdc

Please sign in to comment.