admin
2023-04-21 57e30bc2584b92ce3da3821bd0f6e040f2ad28df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
//  OKMonitorService.h
//  OneKit
//
//  Created by yifei Feng on 2022/6/6.
//
 
#import <OneKit/OKService.h>
 
@interface OKAddressRange : NSObject
 
/*! @abstract The start address of this range.
 */
@property(nonatomic, assign, readonly)int64_t startAddress;
 
/*! @abstract The end address of this range.
 */
@property(nonatomic, assign, readonly)int64_t endAddress;
 
/*!
 Use this method to initialize an addressRange.
 
 @param startAddress The start address of this range.
 @param endAddress The end address of this range.
 */
+ (instancetype)addressRangeWithStartAddress:(int64_t)startAddress endAddress:(int64_t)endAddress;
 
@end
 
 
@interface OKMonitorAddressConfig : NSObject
 
@property (nonatomic, copy, readonly) NSArray<OKAddressRange *> * addressRanges;
 
+ (instancetype)configWithAddressRanges:(NSArray<OKAddressRange *> *)addressRanges;
 
@end
 
 
 
 
@interface OKMonitorSDKConfig : NSObject
 
/*! @abstract The ID of your sdk that you registered from APMInsight.
 @discussion Nonnull & required.
 */
@property (atomic, copy) NSString *sdkID;
 
/*! @abstract Current version of your sdk
 @discussion Nonnull & required.
 */
@property (atomic, copy) NSString *sdkVersion;
 
/*! @abstract The channel where your SDK will be published.
 @discussion Nonnull & require. Default : "Other"
 */
@property (atomic, strong) NSString *channel;
 
/*!
 @abstract The address ranges of your sdk in the main mach-o.
 @discussion Only when the fault address is in the address ranges, we will upload the crash log. Nullable & optional.
 */
@property (atomic, strong) OKMonitorAddressConfig *addressConfig;
 
/**
 Initialize a config with appID.
 
 @param sdkID The ID of your sdk that you registered from APMInsight.
 @result A RangersAPMForSDKConfig instance.
 */
+ (instancetype)configWithSDKID:(NSString *)sdkID SDKVersion:(NSString *)sdkVersion channel:(NSString *)channel addressConfig:(OKMonitorAddressConfig *)addressConfig;
 
@end
 
@protocol OKMonitorSDKService <OKService>
 
- (void)monitorWithConfig:(OKMonitorSDKConfig *)config;
 
@end