-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBugSplat.h
171 lines (128 loc) · 4.96 KB
/
BugSplat.h
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
//
// BugSplat.h
//
// Copyright © 2024 BugSplat, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for BugSplat.
FOUNDATION_EXPORT double BugSplatVersionNumber;
//! Project version string for BugSplat.
FOUNDATION_EXPORT const unsigned char BugSplatVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <BugSplat/PublicHeader.h>
#if TARGET_OS_OSX
#import <BugSplatMac/BugSplatDelegate.h>
#import <BugSplatMac/BugSplatAttachment.h>
#else
#import <BugSplat/BugSplatDelegate.h>
#import <BugSplat/BugSplatAttachment.h>
#endif
NS_ASSUME_NONNULL_BEGIN
/// App's Info.plist String entry which is a customer specific BugSplat database name where crash reports will be uploaded.
/// e.g: "fred" (which will reference the https://fred.bugsplat.com/ database)
#define kBugSplatDatabase @"BugSplatDatabase"
@protocol BugSplatDelegate;
@interface BugSplat : NSObject
/*!
* BugSplat singleton initializer/accessor
*
* @return shared instance of BugSplat
*/
+ (instancetype)shared;
/*!
* Configures and starts crash reporting service
*/
- (void)start;
/**
* Set the delegate
*
* Defines the class that implements the optional protocol `BugSplatDelegate`.
*
* @see BugSplatDelegate
*/
@property (weak, nonatomic, nullable) id<BugSplatDelegate> delegate;
/** Set the userID that should used in the SDK components
Right now this is used by the Crash Manager to attach to a crash report.
The value can be set at any time and will be stored in the keychain on the current
device only! To delete the value from the keychain set the value to `nil`.
This property is optional.
@warning When returning a non nil value, crash reports are not anonymous any more
and the crash alerts will not show the word "anonymous"!
@warning This property needs to be set before calling `start` to be considered
for being added to crash reports as meta data.
@see userName
@see userEmail
@see `[BITHockeyManagerDelegate userIDForHockeyManager:componentManager:]`
*/
@property (nonatomic, copy, nullable) NSString *userID;
/** Set the user name that should used in the SDK components
Right now this is used by the Crash Manager to attach to a crash report.
The value can be set at any time and will be stored in the keychain on the current
device only! To delete the value from the keychain set the value to `nil`.
This property is optional.
@warning When returning a non nil value, crash reports are not anonymous any more
and the crash alerts will not show the word "anonymous"!
@warning This property needs to be set before calling `start` to be considered
for being added to crash reports as meta data.
@see userID
@see userEmail
@see `[BITHockeyManagerDelegate userNameForHockeyManager:componentManager:]`
*/
@property (nonatomic, copy, nullable) NSString *userName;
/** Set the users email address that should used in the SDK components
Right now this is used by the Crash Manager to attach to a crash report.
The value can be set at any time and will be stored in the keychain on the current
device only! To delete the value from the keychain set the value to `nil`.
This property is optional.
@warning When returning a non nil value, crash reports are not anonymous any more
and the crash alerts will not show the word "anonymous"!
@warning This property needs to be set before calling `start` to be considered
for being added to crash reports as meta data.
@see userID
@see userName
@see [BITHockeyManagerDelegate userEmailForHockeyManager:componentManager:]
*/
@property (nonatomic, copy, nullable) NSString *userEmail;
/*!
* Submit crash reports without asking the user
*
* _YES_: The crash report will be submitted without asking the user
* _NO_: The user will be asked if the crash report can be submitted (default)
*
* Default: iOS: _YES_, macOS: _NO_
*/
@property (nonatomic, assign) BOOL autoSubmitCrashReport;
// macOS specific API
#if TARGET_OS_OSX
/*!
* Provide custom banner image for crash reporter.
* Can set directly in code or provide an image named bugsplat-logo in main bundle. Can be in asset catalog.
*/
@property (nonatomic, strong, nullable) NSImage *bannerImage;
/**
* Defines if the crash report UI should ask for name and email
*
* Default: _YES_
*/
@property (nonatomic, assign) BOOL askUserDetails;
/**
* Defines if user's name and email entered in the crash report UI should be saved to the keychain.
*
* Default: _NO_
*/
@property (nonatomic, assign) BOOL persistUserDetails;
/**
* Defines if crash reports should be considered "expired" after a certain amount of time (in seconds).
* If expired crash dialogue is not displayed but reports are still uploaded.
*
* Default: -1 // No expiration
*/
@property (nonatomic, assign) NSTimeInterval expirationTimeInterval;
/**
* Option to present crash reporter dialogue modally
*
* *Default*: NO
*/
@property (nonatomic, assign) BOOL presentModally;
#endif
@end
NS_ASSUME_NONNULL_END