Skip to content

Commit 32cb92f

Browse files
author
weiqiangliu
committed
Release 0.1.1
1 parent 80d754f commit 32cb92f

File tree

139 files changed

+8680
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+8680
-100
lines changed

.idea/workspace.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
## SDK 简介
1313

14-
SensorsAnalytics SDK 是国内第一家开源商用版用户行为采集 SDK,目前支持代码埋点、全埋点、App 点击图、可视化全埋点等。目前已累计有 1500 多家付费客户,2500+ 的 App 集成使用,作为 App 数据采集利器,致力于帮助客户挖掘更多的商业价值,为其精准运营和业务支撑提供了可靠的数据来源。其采集全面而灵活、性能良好,并一直保持稳定的迭代,经受住了时间和客户的考验。
14+
一款支持 uni-app 项目进行埋点数据采集的原生插件,插件下载地址及使用教程见:[神策分析原生插件](https://ext.dcloud.net.cn/plugin?id=4179)
1515

1616
## 版本更新记录
1717

@@ -38,7 +38,7 @@ SensorsAnalytics SDK 是国内第一家开源商用版用户行为采集 SDK,
3838

3939
## License
4040

41-
Copyright 2015-2022 Sensors Data Inc.
41+
Copyright 2015-2023 Sensors Data Inc.
4242

4343
Licensed under the Apache License, Version 2.0 (the "License");
4444
you may not use this file except in compliance with the License.
33.5 KB
Binary file not shown.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>LibraryIdentifier</key>
9+
<string>ios-arm64_x86_64-simulator</string>
10+
<key>LibraryPath</key>
11+
<string>SensorsAnalyticsSDK.framework</string>
12+
<key>SupportedArchitectures</key>
13+
<array>
14+
<string>arm64</string>
15+
<string>x86_64</string>
16+
</array>
17+
<key>SupportedPlatform</key>
18+
<string>ios</string>
19+
<key>SupportedPlatformVariant</key>
20+
<string>simulator</string>
21+
</dict>
22+
<dict>
23+
<key>LibraryIdentifier</key>
24+
<string>ios-arm64</string>
25+
<key>LibraryPath</key>
26+
<string>SensorsAnalyticsSDK.framework</string>
27+
<key>SupportedArchitectures</key>
28+
<array>
29+
<string>arm64</string>
30+
</array>
31+
<key>SupportedPlatform</key>
32+
<string>ios</string>
33+
</dict>
34+
</array>
35+
<key>CFBundlePackageType</key>
36+
<string>XFWK</string>
37+
<key>XCFrameworkFormatVersion</key>
38+
<string>1.0</string>
39+
</dict>
40+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//
2+
// SAAESStorePlugin.h
3+
// SensorsAnalyticsSDK
4+
//
5+
// Created by 张敏超🍎 on 2021/12/1.
6+
// Copyright © 2015-2022 Sensors Data Co., Ltd. All rights reserved.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
//
20+
21+
#import <Foundation/Foundation.h>
22+
#import "SAStorePlugin.h"
23+
24+
NS_ASSUME_NONNULL_BEGIN
25+
26+
@interface SAAESStorePlugin : NSObject <SAStorePlugin>
27+
28+
@end
29+
30+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
//
2+
// SAAppExtensionDataManager.h
3+
// SensorsAnalyticsSDK
4+
//
5+
// Created by 向作为 on 2018/1/18.
6+
// Copyright © 2015-2022 Sensors Data Co., Ltd. All rights reserved.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
//
20+
21+
#import <Foundation/Foundation.h>
22+
23+
/**
24+
SAAppExtensionDataManager 扩展应用的数据管理类
25+
*/
26+
@interface SAAppExtensionDataManager : NSObject {
27+
NSArray * _groupIdentifierArray;
28+
}
29+
30+
/**
31+
* @property
32+
*
33+
* @abstract
34+
* ApplicationGroupIdentifier数组
35+
*/
36+
@property (nonatomic, strong) NSArray *groupIdentifierArray;
37+
38+
+ (instancetype)sharedInstance;
39+
40+
/**
41+
* @abstract
42+
* 根据传入的 ApplicationGroupIdentifier 返回对应 Extension 的数据缓存路径
43+
*
44+
* @param groupIdentifier ApplicationGroupIdentifier
45+
* @return 在 group 中的数据缓存路径
46+
*/
47+
- (NSString *)filePathForApplicationGroupIdentifier:(NSString *)groupIdentifier;
48+
49+
/**
50+
* @abstract
51+
* 根据传入的 ApplicationGroupIdentifier 返回对应 Extension 当前缓存的事件数量
52+
* @param groupIdentifier ApplicationGroupIdentifier
53+
* @return 在该 group 中当前缓存的事件数量
54+
*/
55+
- (NSUInteger)fileDataCountForGroupIdentifier:(NSString *)groupIdentifier;
56+
57+
/**
58+
* @abstract
59+
* 从指定路径限量读取缓存的数据
60+
* @param path 缓存路径
61+
* @param limit 限定读取数,不足则返回当前缓存的全部数据
62+
* @return 路径限量读取limit条数据,当前的缓存的事件数量不足 limit,则返回当前缓存的全部数据
63+
*/
64+
- (NSArray *)fileDataArrayWithPath:(NSString *)path limit:(NSUInteger)limit;
65+
66+
/**
67+
* @abstract
68+
* 给一个groupIdentifier写入事件和属性
69+
* @param eventName 事件名称(!须符合变量的命名规范)
70+
* @param properties 事件属性
71+
* @param groupIdentifier ApplicationGroupIdentifier
72+
* @return 是否(YES/NO)写入成功
73+
*/
74+
- (BOOL)writeEvent:(NSString *)eventName properties:(NSDictionary *)properties groupIdentifier:(NSString *)groupIdentifier;
75+
76+
/**
77+
* @abstract
78+
* 读取groupIdentifier的所有缓存事件
79+
* @param groupIdentifier ApplicationGroupIdentifier
80+
* @return 当前groupIdentifier缓存的所有事件
81+
*/
82+
- (NSArray *)readAllEventsWithGroupIdentifier:(NSString *)groupIdentifier;
83+
84+
/**
85+
* @abstract
86+
* 删除groupIdentifier的所有缓存事件
87+
* @param groupIdentifier ApplicationGroupIdentifier
88+
* @return 是否(YES/NO)删除成功
89+
*/
90+
- (BOOL)deleteEventsWithGroupIdentifier:(NSString *)groupIdentifier;
91+
92+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
//
2+
// SABaseStoreManager.h
3+
// SensorsAnalyticsSDK
4+
//
5+
// Created by 张敏超🍎 on 2021/12/8.
6+
// Copyright © 2015-2022 Sensors Data Co., Ltd. All rights reserved.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
//
20+
21+
#import <Foundation/Foundation.h>
22+
#import "SAStorePlugin.h"
23+
24+
NS_ASSUME_NONNULL_BEGIN
25+
26+
typedef void(^SAStoreManagerCompletion)(id _Nullable object);
27+
28+
@interface SABaseStoreManager : NSObject
29+
30+
- (void)registerStorePlugin:(id<SAStorePlugin>)plugin;
31+
32+
#pragma mark - get
33+
34+
- (nullable id)objectForKey:(NSString *)key;
35+
- (void)objectForKey:(NSString *)key completion:(SAStoreManagerCompletion)completion;
36+
37+
- (nullable NSString *)stringForKey:(NSString *)key;
38+
- (nullable NSArray *)arrayForKey:(NSString *)key;
39+
- (nullable NSDictionary *)dictionaryForKey:(NSString *)key;
40+
- (nullable NSData *)dataForKey:(NSString *)key;
41+
- (NSInteger)integerForKey:(NSString *)key;
42+
- (float)floatForKey:(NSString *)key;
43+
- (double)doubleForKey:(NSString *)key;
44+
- (BOOL)boolForKey:(NSString *)key;
45+
46+
#pragma mark - set
47+
48+
- (void)setObject:(nullable id)object forKey:(NSString *)key;
49+
50+
- (void)setInteger:(NSInteger)value forKey:(NSString *)key;
51+
- (void)setFloat:(float)value forKey:(NSString *)key;
52+
- (void)setDouble:(double)value forKey:(NSString *)key;
53+
- (void)setBool:(BOOL)value forKey:(NSString *)key;
54+
55+
#pragma mark - remove
56+
57+
- (void)removeObjectForKey:(NSString *)key;
58+
59+
@end
60+
61+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// SAConfigOptions+AppPush.h
3+
// SensorsAnalyticsSDK
4+
//
5+
// Created by 陈玉国 on 2021/9/9.
6+
// Copyright © 2015-2022 Sensors Data Co., Ltd. All rights reserved.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
//
20+
21+
#import "SAConfigOptions.h"
22+
23+
NS_ASSUME_NONNULL_BEGIN
24+
25+
@interface SAConfigOptions (AppPush)
26+
27+
///开启自动采集通知
28+
@property (nonatomic, assign) BOOL enableTrackPush API_UNAVAILABLE(macos);
29+
30+
@end
31+
32+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//
2+
// SAConfigOptions+Encrypt.h
3+
// SensorsAnalyticsSDK
4+
//
5+
// Created by 彭远洋 on 2021/4/16.
6+
// Copyright © 2015-2022 Sensors Data Co., Ltd. All rights reserved.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
//
20+
21+
#import "SAEncryptProtocol.h"
22+
#import "SAConfigOptions.h"
23+
24+
NS_ASSUME_NONNULL_BEGIN
25+
26+
@interface SAConfigOptions (Encrypt)
27+
28+
/// 是否开启加密
29+
@property (nonatomic, assign) BOOL enableEncrypt API_UNAVAILABLE(macos);
30+
31+
- (void)registerEncryptor:(id<SAEncryptProtocol>)encryptor API_UNAVAILABLE(macos);
32+
33+
/// 存储公钥的回调。务必保存秘钥所有字段信息
34+
@property (nonatomic, copy) void (^saveSecretKey)(SASecretKey * _Nonnull secretKey) API_UNAVAILABLE(macos);
35+
36+
/// 获取公钥的回调。务必回传秘钥所有字段信息
37+
@property (nonatomic, copy) SASecretKey * _Nonnull (^loadSecretKey)(void) API_UNAVAILABLE(macos);
38+
39+
@end
40+
41+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// SAConfigOptions+Exception.h
3+
// SensorsAnalyticsSDK
4+
//
5+
// Created by 陈玉国 on 2021/9/10.
6+
// Copyright © 2015-2022 Sensors Data Co., Ltd. All rights reserved.
7+
//
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
//
20+
21+
#import "SAConfigOptions.h"
22+
23+
NS_ASSUME_NONNULL_BEGIN
24+
25+
@interface SAConfigOptions (Exception)
26+
27+
/// 是否自动收集 App Crash 日志,该功能默认是关闭的
28+
@property (nonatomic, assign) BOOL enableTrackAppCrash API_UNAVAILABLE(macos);
29+
30+
@end
31+
32+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)