diff --git a/SensorsAnalyticsSDK.podspec b/SensorsAnalyticsSDK.podspec index 22f927aa..6f5d4696 100644 --- a/SensorsAnalyticsSDK.podspec +++ b/SensorsAnalyticsSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SensorsAnalyticsSDK" - s.version = "4.7.0" + s.version = "4.7.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}" } diff --git a/SensorsAnalyticsSDK/Core/HookDelegate/NSObject+SADelegateProxy.m b/SensorsAnalyticsSDK/Core/HookDelegate/NSObject+SADelegateProxy.m index c67af4f4..784b2eb3 100644 --- a/SensorsAnalyticsSDK/Core/HookDelegate/NSObject+SADelegateProxy.m +++ b/SensorsAnalyticsSDK/Core/HookDelegate/NSObject+SADelegateProxy.m @@ -25,6 +25,10 @@ #import "NSObject+SADelegateProxy.h" #import +#if TARGET_OS_IOS +#import +#endif + static void *const kSANSObjectDelegateOptionalSelectorsKey = (void *)&kSANSObjectDelegateOptionalSelectorsKey; static void *const kSANSObjectDelegateObjectKey = (void *)&kSANSObjectDelegateObjectKey; @@ -53,6 +57,16 @@ - (BOOL)sensorsdata_respondsToSelector:(SEL)aSelector { if ([self sensorsdata_respondsToSelector:aSelector]) { return YES; } + +#if TARGET_OS_IOS + if ([[UIDevice currentDevice].systemVersion floatValue] == 18.0) { + char cString = (char)sel_getName(aSelector); + if (cString == '\x01') { + return NO; + } + } +#endif + if ([self.sensorsdata_optionalSelectors containsObject:NSStringFromSelector(aSelector)]) { return YES; } diff --git a/SensorsAnalyticsSDK/Core/SensorsAnalyticsSDK.m b/SensorsAnalyticsSDK/Core/SensorsAnalyticsSDK.m index 5db6239d..6c123117 100755 --- a/SensorsAnalyticsSDK/Core/SensorsAnalyticsSDK.m +++ b/SensorsAnalyticsSDK/Core/SensorsAnalyticsSDK.m @@ -68,7 +68,7 @@ #import #endif -#define VERSION @"4.7.0" +#define VERSION @"4.7.1" void *SensorsAnalyticsQueueTag = &SensorsAnalyticsQueueTag; diff --git a/SensorsAnalyticsSDK/Core/Tracker/SAEventRecord.h b/SensorsAnalyticsSDK/Core/Tracker/SAEventRecord.h index 904f1d35..07101d1d 100644 --- a/SensorsAnalyticsSDK/Core/Tracker/SAEventRecord.h +++ b/SensorsAnalyticsSDK/Core/Tracker/SAEventRecord.h @@ -62,7 +62,7 @@ typedef NS_ENUM(int, SAEventRecordStatus) { - (void)setSecretObject:(NSDictionary *)obj; - (void)removePayload; -- (BOOL)mergeSameEKeyRecord:(SAEventRecord *)record; +- (BOOL)mergeSameEKeyPayloadWithRecord:(SAEventRecord *)record; @end diff --git a/SensorsAnalyticsSDK/Core/Tracker/SAEventRecord.m b/SensorsAnalyticsSDK/Core/Tracker/SAEventRecord.m index b2ea9091..22e2ec6f 100644 --- a/SensorsAnalyticsSDK/Core/Tracker/SAEventRecord.m +++ b/SensorsAnalyticsSDK/Core/Tracker/SAEventRecord.m @@ -100,7 +100,7 @@ - (void)removePayload { [_event removeObjectForKey:kSAEncryptRecordKeyPayload]; } -- (BOOL)mergeSameEKeyRecord:(SAEventRecord *)record { +- (BOOL)mergeSameEKeyPayloadWithRecord:(SAEventRecord *)record { if (![self.ekey isEqualToString:record.ekey]) { return NO; } diff --git a/SensorsAnalyticsSDK/Encrypt/SAFlushJSONInterceptor+Encrypt.m b/SensorsAnalyticsSDK/Encrypt/SAFlushJSONInterceptor+Encrypt.m index e8e39ac4..cfa55286 100644 --- a/SensorsAnalyticsSDK/Encrypt/SAFlushJSONInterceptor+Encrypt.m +++ b/SensorsAnalyticsSDK/Encrypt/SAFlushJSONInterceptor+Encrypt.m @@ -83,7 +83,7 @@ - (NSString *)buildEncryptJSONStringWithFlowData:(SAFlowData *)flowData { [ekeys addObject:record.ekey]; } else { - [encryptRecords[index] mergeSameEKeyRecord:record]; + [encryptRecords[index] mergeSameEKeyPayloadWithRecord:record]; } } flowData.gzipCode = SAFlushGzipCodeEncrypt;