Skip to content

Commit

Permalink
Release 4.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoyue committed Sep 29, 2024
1 parent 9c0e0a6 commit a43dc33
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
5 changes: 4 additions & 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.8.1"
s.version = "4.8.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 All @@ -12,6 +12,9 @@ Pod::Spec.new do |s|
s.default_subspec = 'Core'
s.frameworks = 'Foundation', 'SystemConfiguration'

# 限制 CocoaPods 版本
s.cocoapods_version = '>= 1.12.0'

s.libraries = 'icucore', 'z'

s.subspec '__Store' do |store|
Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/Core/SensorsAnalyticsSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#import <UIKit/UIApplication.h>
#endif

#define VERSION @"4.8.1"
#define VERSION @"4.8.2"

void *SensorsAnalyticsQueueTag = &SensorsAnalyticsQueueTag;

Expand Down
2 changes: 2 additions & 0 deletions SensorsAnalyticsSDK/Core/Tracker/SAEventStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ extern NSString * const kSADatabaseDefaultFileName;
*
* @return 初始化的结果
*/
- (instancetype)initWithFilePath:(NSString *)filePath;

+ (instancetype)eventStoreWithFilePath:(NSString *)filePath;

/// fetch first records with a certain size
Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/RemoteConfig/SARemoteConfigOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 从请求远程配置的返回结果中获取加密相关内容
/// @param config 请求远程配置的返回结果
/// @return 加密相关内容
- (NSDictionary<NSString *, id> *)extractEncryptConfig:(NSDictionary<NSString *, id> *)config;
//- (NSDictionary<NSString *, id> *)extractEncryptConfig:(NSDictionary<NSString *, id> *)config;

/// 触发 $AppRemoteConfigChanged 事件
/// @param remoteConfig 事件中的属性
Expand Down
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/Store/SABaseStoreManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ - (void)registerStorePlugin:(id<SAStorePlugin>)plugin {
[self.plugins enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(id<SAStorePlugin> _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([plugin.type isEqualToString:obj.type]) {
[self.plugins removeObjectAtIndex:idx];
} else {
} else if ([plugin respondsToSelector:@selector(upgradeWithOldPlugin:)]){
[plugin upgradeWithOldPlugin:obj];
}
}];
Expand Down
9 changes: 5 additions & 4 deletions SensorsAnalyticsSDK/Store/SAStorePlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ NS_ASSUME_NONNULL_BEGIN

- (NSString *)type;

- (nullable id)objectForKey:(NSString *)key;
- (void)setObject:(nullable id)value forKey:(NSString *)key;
- (void)removeObjectForKey:(NSString *)key;

@optional
/// 可以用于将一些重要特殊的 key 进行迁移操作
///
/// SDK 会在注册新插件时,调用该方法
Expand All @@ -34,10 +39,6 @@ NS_ASSUME_NONNULL_BEGIN
/// @param oldPlugin 旧插件
- (void)upgradeWithOldPlugin:(id<SAStorePlugin>)oldPlugin;

- (nullable id)objectForKey:(NSString *)key;
- (void)setObject:(nullable id)value forKey:(NSString *)key;
- (void)removeObjectForKey:(NSString *)key;

/// 注册自定义存储插件,是否忽略历史旧数据
///
/// 如果未实现,则默认不忽略,即迁移历史数据迁移
Expand Down

0 comments on commit a43dc33

Please sign in to comment.