Skip to content

Commit 3ce81e7

Browse files
author
xiaocui0803
committed
release:更新版本至2.8.0-beta
1 parent 5ce7427 commit 3ce81e7

110 files changed

Lines changed: 6039 additions & 2 deletions

File tree

Some content is hidden

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

BuglyPro.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Pod::Spec.new do |s|
77
s.homepage = "http://bugly.tds.qq.com/"
88
s.license = { :type => "Commercial", :text => "Copyright (C) 2024 Tencent Bugly, Inc. All rights reserved."}
99
s.author = { "Tencent" => "bugly@tencent.com" }
10-
s.source = { :http => "https://buglyprococoapodssdk-75649.gzc.vod.tencent-cloud.com/BuglyPro-2.8.0-beta.zip" }
10+
s.source = { :git => "https://github.com/BuglyDevTeam/BuglyPro-iOS.git", :tag => "#{s.version}" }
1111
s.requires_arc = true
1212
s.platform = :ios
1313
s.ios.deployment_target = '9.0'
14-
s.vendored_frameworks ='BuglyPro.xcframework'
14+
s.vendored_frameworks ='source/BuglyPro.xcframework'
1515
s.frameworks = 'SystemConfiguration','Security','Network'
1616
s.library = 'z','c++'
1717
s.license = {
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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>BuglyPro.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_x86_64-maccatalyst</string>
25+
<key>LibraryPath</key>
26+
<string>BuglyPro.framework</string>
27+
<key>SupportedArchitectures</key>
28+
<array>
29+
<string>arm64</string>
30+
<string>x86_64</string>
31+
</array>
32+
<key>SupportedPlatform</key>
33+
<string>ios</string>
34+
<key>SupportedPlatformVariant</key>
35+
<string>maccatalyst</string>
36+
</dict>
37+
<dict>
38+
<key>LibraryIdentifier</key>
39+
<string>ios-arm64_armv7</string>
40+
<key>LibraryPath</key>
41+
<string>BuglyPro.framework</string>
42+
<key>SupportedArchitectures</key>
43+
<array>
44+
<string>arm64</string>
45+
<string>armv7</string>
46+
</array>
47+
<key>SupportedPlatform</key>
48+
<string>ios</string>
49+
</dict>
50+
</array>
51+
<key>CFBundlePackageType</key>
52+
<string>XFWK</string>
53+
<key>XCFrameworkFormatVersion</key>
54+
<string>1.0</string>
55+
</dict>
56+
</plist>
Binary file not shown.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
//
2+
// Bugly.h
3+
//
4+
// Version: 2.0(1)
5+
//
6+
// Copyright (c) 2017年 Tencent. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
#import "BuglyDefine.h"
12+
#import "BuglyConfig.h"
13+
#import "BuglyMonitorCallback.h"
14+
15+
NS_ASSUME_NONNULL_BEGIN
16+
17+
@interface Bugly : NSObject
18+
19+
- (instancetype)init NS_UNAVAILABLE;
20+
- (instancetype)new NS_UNAVAILABLE;
21+
22+
/**
23+
* 初始化 Bugly
24+
*
25+
* !!!: 整个进程生命周期中,仅可以调用和初始化一次 Bugly SDK!!!
26+
*
27+
* @param config 传入配置的 BuglyConfig
28+
*/
29+
+ (void)startWithConfig:(BuglyConfig *)config;
30+
31+
/**
32+
* 初始化 Bugly
33+
*
34+
* @param pluginArr 启用的模块,默认使用 RM_MODULE_ALL
35+
* @param config 传入配置的 BuglyConfig
36+
*/
37+
+ (void)start:(NSArray<NSString *> *)pluginArr config:(BuglyConfig *)config;
38+
+ (void)start:(NSArray<NSString *> *)pluginArr
39+
config:(BuglyConfig *)config completeHandler:(nullable void (^)(void))completionHandler;
40+
41+
/**
42+
* 是否允许 Bugly 进行数据上报,未调用过此接口时,数据上报正常打开
43+
* !!!: 仅当前进程设置有效,下次重新启动后,会恢复默认打开状态,SDK 初始化完成前设置无效
44+
* 在必要时,可通过设置为 NO 禁止/恢复 SDK 产生数据上报
45+
* 若设置为 NO 时,内部数据上报及产生的数据全部丢弃,若之后重新设置为 YES 时,之后产生数据会恢复上报
46+
*/
47+
+ (void)setBuglyDataReportEnable:(BOOL)isEnable;
48+
49+
/// 注册日志函数指针
50+
/// @param logger 日志函数
51+
+ (void)registerLogCallback:(RMLogCallback)logger;
52+
53+
/// 更新userId
54+
/// @param userId 用户id
55+
+ (void)updateUserIdentifier:(NSString *)userId;
56+
57+
/// 更新设备id
58+
/// @param deviceId 设备id
59+
+ (void)updateDeviceIdentifier:(NSString *)deviceId;
60+
61+
/// 更新场景信息
62+
/// @param scene 场景id,卡顿、内存、资源监控等功能会根据该值进行聚类
63+
+ (void)setScene:(NSString *)scene;
64+
65+
/// 重置自定义场景信息,继续使用 RMonitor 自动获取的场景信息
66+
+ (void)resetScene;
67+
68+
/**
69+
* 获取 SDK 版本信息
70+
* @return SDK版本号
71+
*/
72+
+ (NSString *)sdkVersion;
73+
74+
/**
75+
* 添加自定义上报的tag, SDK初始化前调用无效
76+
* @param data 需要更新的自定义字段
77+
*/
78+
+ (void)updateCustomData:(BuglyCustomData *)data;
79+
80+
/**
81+
* 获取当前自定标签的副本信息,若未设置,返回空
82+
* @return 已设置的用户自定义字段
83+
*/
84+
+ (nullable BuglyCustomData *)currentCustomData;
85+
86+
/**
87+
* 添加自定义数据为特定的事件上报
88+
* @param data 需要更新的自定义字段
89+
* @param eventType 对应的事件类型
90+
*/
91+
+ (void)updateCustomData:(BuglyCustomData *)data forEvent:(BuglyEventTypeName)eventType;
92+
93+
/**
94+
* 获取特定事件的当前自定义数据
95+
* @param eventType 需要获取的事件类型
96+
* @return 对应已设置的自定义字段
97+
*/
98+
+ (nullable BuglyCustomData *)currentCustomDataForEvent:(BuglyEventTypeName)eventType;
99+
100+
/**
101+
* 更新 shiply sdk 相关标签,需要在 bugly sdk 完成初始化(Bugly setup completeHandler 回调)后调用,否则可能导致数据丢失
102+
* @params tagArr 字符串数组,字符串限长 1024 字节,数组限长 30
103+
*/
104+
+ (void)updateShiplyTags:(NSArray<NSString *> *)tagArr;
105+
106+
/**
107+
* 更新个例标签,需要在 bugly sdk 完成初始化(Bugly setup completeHandler 回调)后调用,否则可能导致数据丢失
108+
* @params tagArr 字符串数组,字符串限长 1024 字节,数组限长 30
109+
*/
110+
+ (void)updateCaseTags:(NSArray<NSString *> *)tagArr;
111+
112+
/**
113+
* 更新实验标签,需要在 bugly sdk 完成初始化(Bugly setup completeHandler 回调)后调用,否则可能导致数据丢失
114+
* @params tagArr 字符串数组,字符串限长 1024 字节,数组限长 30
115+
*/
116+
+ (void)updateTestTags:(NSArray<NSString *> *)tagArr;
117+
118+
/**
119+
* 设置 app 扩展版本号
120+
*/
121+
+ (void)setAppDynamicExtendVersion:(NSString *)extendVersion;
122+
123+
/**
124+
* 设置监控回调
125+
* 监控回调用于实时回调对应监控项的实时数据
126+
* @params callback 对应的回调,因实时回调,因此 callback 中的处理需要尽可能的快速, 空表示清楚上次设置
127+
* @params event 对应的监控项目
128+
*/
129+
+ (void)setBuglyMonitorCallback:(nullable BuglyMonitorCallback)callback
130+
forEvent:(BuglyMonitorCallbackEvent)event;
131+
132+
@end
133+
134+
NS_ASSUME_NONNULL_END
135+
136+
#if defined __has_include
137+
#if __has_include("Bugly+Deprecated.h")
138+
#import "Bugly+Deprecated.h"
139+
#endif
140+
#endif
141+
#if defined __has_include
142+
#if __has_include("BuglyExceptionReportInfo.h")
143+
#import "BuglyExceptionReportInfo.h"
144+
#endif
145+
#endif
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// BuglyAppLifeCycleProvider.h
3+
// RaftMonitor
4+
//
5+
// Created by Tianwu Wang on 2023/12/15.
6+
// Copyright © 2023 Tencent. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <UIKit/UIKit.h>
11+
12+
NS_ASSUME_NONNULL_BEGIN
13+
14+
@interface BuglyAppLifeCycleNotifyInfos : NSObject
15+
16+
@property (nonatomic, copy) NSNotificationName appDidFinishLaunchingNotifyName;
17+
@property (nonatomic, copy) NSNotificationName appWillEnterForgroundNotifyName;
18+
@property (nonatomic, copy) NSNotificationName appDidBecomeActiveNotifyName;
19+
@property (nonatomic, copy) NSNotificationName appDidEnterBackgroundNotifyName;
20+
@property (nonatomic, copy) NSNotificationName appWillResignActiveNotifyName;
21+
@property (nonatomic, copy) NSNotificationName appDidReceiveMemoryWarningNotifyName;
22+
@property (nonatomic, copy) NSNotificationName appWillTerminateNotifyName;
23+
24+
@end
25+
26+
@interface BuglyAppLifeCycleProvider : NSObject
27+
28+
/**
29+
* 是否启用 app delegate swizzle,默认开启
30+
* 开启后,会提高 SDK 对前后台状态判定的准确性
31+
*/
32+
- (BOOL)useAppLifeCycleSwizzle;
33+
34+
/**
35+
* 确保 BuglyAppLifeCycleNotifyInfos 值都是有效值
36+
*/
37+
- (BuglyAppLifeCycleNotifyInfos *)appLifeCycleNotifyInfos;
38+
39+
/**
40+
* SDK 内部会随时调用此方法,因此需要确保其实现安全高效
41+
*/
42+
- (UIApplicationState)currentAppState;
43+
44+
@end
45+
46+
NS_ASSUME_NONNULL_END
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
//
2+
// BuglyConfig.h
3+
// Bugly
4+
//
5+
// Created by engleliu on 2023/4/27
6+
// Copyright © 2023 Tencent. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "BuglyDefine.h"
11+
#import "BuglyDelegate.h"
12+
13+
NS_ASSUME_NONNULL_BEGIN
14+
15+
@class BuglyAppLifeCycleProvider;
16+
17+
@interface BuglyConfig : NSObject
18+
19+
/// appid, 详见 https://bugly.oa.com/ 产品配置 - appid
20+
@property (nonatomic, copy) NSString *appId;
21+
22+
/// appkey, 详见 https://bugly.oa.com/ 产品配置 - appkey
23+
@property (nonatomic, copy) NSString *appKey;
24+
/// 设置自定义版本号
25+
@property (nonatomic, copy) NSString *appVersion;
26+
/// 设置自定义设备唯一标识
27+
@property (nonatomic, copy) NSString *deviceIdentifier;
28+
/// 自定义用户id
29+
@property (nonatomic, copy) NSString *userIdentifier;
30+
/// build config,用于拉取不同的配置
31+
@property (nonatomic, assign) BuglyBuildConfig buildConfig;
32+
33+
/// Bugly Delegate
34+
@property (nonatomic, weak) id<BuglyDelegate> delegate;
35+
36+
/// 可以提供自定义的生命周期 provider
37+
@property (nonatomic, strong) BuglyAppLifeCycleProvider *appLifeCycleProvider;
38+
39+
/// 是否预初始化 Crash 监控, 默认为 NO
40+
/// 开启后,可以同步提前初始化 Crash 监控模块,增加启动阶段的 Crash 捕获成功率
41+
/// 但会增加一定的启动耗时,同时基础的 Crash 监控的开启不再接受 Bugly 平台的配置的控制
42+
/// (但 Crash 上报依然接受配置控制)
43+
@property (atomic, assign) BOOL isSyncInitCrashMonitor;
44+
45+
/// 设置自定义渠道标识
46+
@property (nonatomic, copy) NSString *channel;
47+
48+
- (instancetype)init NS_UNAVAILABLE;
49+
+ (instancetype)new NS_UNAVAILABLE;
50+
51+
/// @brief init
52+
/// @param appId 详见 http://bugly.oa.com/, 项目管理 - 产品配置 - appid
53+
/// @param appKey 详见 http://bugly.oa.com/, 项目管理 - 产品配置 - appkey
54+
- (instancetype)initWithAppId:(NSString *)appId appKey:(NSString *)appKey;
55+
56+
+ (BuglyConfig *)paramWithAppId:(NSString *)appId appKey:(NSString *)appKey;
57+
58+
@end
59+
60+
NS_ASSUME_NONNULL_END
61+
62+
#if defined __has_include
63+
#if __has_include("BuglyConfig+Deprecated.h")
64+
#import "BuglyConfig+Deprecated.h"
65+
#endif
66+
#endif

0 commit comments

Comments
 (0)