Skip to content

Commit

Permalink
release 4.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoyue committed Aug 7, 2024
1 parent 3124e86 commit 0d2928f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 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.7.1"
s.version = "4.7.2"
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
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ - (BOOL)sensorsdata_respondsToSelector:(SEL)aSelector {
}

#if TARGET_OS_IOS
if ([[UIDevice currentDevice].systemVersion floatValue] == 18.0) {
if (@available(iOS 18.0, *)) {
char cString = (char)sel_getName(aSelector);
if (cString == '\x01') {
return NO;
Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/Core/SensorsAnalyticsSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#import <UIKit/UIApplication.h>
#endif

#define VERSION @"4.7.1"
#define VERSION @"4.7.2"

void *SensorsAnalyticsQueueTag = &SensorsAnalyticsQueueTag;

Expand Down
2 changes: 2 additions & 0 deletions SensorsAnalyticsSDK/Store/SAAESCrypt.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ - (nullable NSString *)encryptData:(NSData *)obj {
NSMutableData *iv = [NSMutableData dataWithLength:kCCBlockSizeAES128];
int result = SecRandomCopyBytes(kSecRandomDefault, kCCBlockSizeAES128, iv.mutableBytes);
if (result != errSecSuccess) {
free(buffer);
return nil;
}

Expand Down Expand Up @@ -111,6 +112,7 @@ - (nullable NSData *)decryptData:(NSData *)obj {
NSMutableData *iv = [NSMutableData dataWithLength:kCCBlockSizeAES128];
int result = SecRandomCopyBytes(kSecRandomDefault, kCCBlockSizeAES128, iv.mutableBytes);
if (result != errSecSuccess) {
free(buffer);
return nil;
}

Expand Down
1 change: 1 addition & 0 deletions SensorsAnalyticsTests/SAEncryptTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ - (NSString *)aesDecrypt:(NSData *)publicKey encryptedContent:(NSString *)encryp
NSData *result = [NSData dataWithBytesNoCopy:buffer length:numBytesDecrypted];
NSRange range = NSMakeRange(16, result.length - 16);
NSData *da = [result subdataWithRange:range];

return [[NSString alloc] initWithData:da encoding:NSUTF8StringEncoding];
}
free(buffer);
Expand Down

0 comments on commit 0d2928f

Please sign in to comment.