55
66 Copyright: (c) 2013-2017 by Instabug, Inc., all rights reserved.
77
8- Version: 6.4.1
8+ Version: 7.0
99 */
1010
1111#import < Foundation/Foundation.h>
@@ -72,8 +72,8 @@ NS_ASSUME_NONNULL_BEGIN
7272/* *
7373 @brief Attaches a file to each report being sent.
7474
75- @deprecated Starting from v6.3, use `setFileAttachmentWithURL :` instead.
76-
75+ @deprecated Use `addFileAttachmentWithURL :` instead.
76+
7777 @discussion A new copy of the file at fileURL will be attached with each bug report being sent. The file is only copied
7878 at the time of sending the report, so you could safely call this API whenever the file is available on disk, and the copy
7979 attached to your bug reports will always contain that latest changes at the time of sending the report.
@@ -83,11 +83,13 @@ NS_ASSUME_NONNULL_BEGIN
8383
8484 @param fileLocation Path to a file that's going to be attached to each report.
8585 */
86- + (void )setFileAttachment : (NSString *)fileLocation DEPRECATED_MSG_ATTRIBUTE(" Starting from v6.3, use setFileAttachmentWithURL : instead." );
86+ + (void )setFileAttachment : (NSString *)fileLocation DEPRECATED_MSG_ATTRIBUTE(" Use addFileAttachmentWithURL : instead." );
8787
8888/* *
8989 @brief Attaches a file to each report being sent.
9090
91+ @deprecated Use `addFileAttachmentWithURL:` instead.
92+
9193 @discussion A new copy of the file at fileURL will be attached with each bug report being sent. The file is only copied
9294 at the time of sending the report, so you could safely call this API whenever the file is available on disk, and the copy
9395 attached to your bug reports will always contain that latest changes at the time of sending the report.
@@ -97,7 +99,31 @@ NS_ASSUME_NONNULL_BEGIN
9799
98100 @param fileURL Path to a file that's going to be attached to each report.
99101 */
100- + (void )setFileAttachmentWithURL : (NSURL *)fileURL ;
102+ + (void )setFileAttachmentWithURL : (NSURL *)fileURL DEPRECATED_MSG_ATTRIBUTE(" Use addFileAttachmentWithURL: instead." );
103+
104+
105+ /* *
106+ @brief Add file to attached files with each report being sent.
107+
108+ @discussion A new copy of the file at fileURL will be attached with each bug report being sent. The file is only copied
109+ at the time of sending the report, so you could safely call this API whenever the file is available on disk, and the copy
110+ attached to your bug reports will always contain that latest changes at the time of sending the report.
111+
112+ Each call to this method adds the file to the files attached, until a maximum of 3 then it overrides the first file.
113+ The file has to be available locally at the provided path when the report is being sent.
114+
115+ @param fileURL Path to a file that's going to be attached to each report.
116+ */
117+ + (void )addFileAttachmentWithURL : (NSURL *)fileURL ;
118+
119+
120+ /* *
121+ @brief Clear list of files to be attached with each report.
122+
123+ @discussion This method doesn't delete any files from the file system. It will just removes them for the list of files
124+ to be attached with each report.
125+ */
126+ + (void )clearFileAttachments ;
101127
102128/* *
103129 @brief Attaches user data to each report being sent.
@@ -244,13 +270,30 @@ NS_ASSUME_NONNULL_BEGIN
244270+ (void )setWillTakeScreenshot : (BOOL )willTakeScreenshot DEPRECATED_MSG_ATTRIBUTE(" Starting from v6.0, use setAttachmentTypesEnabledScreenShot:extraScreenShot:galleryImage:voiceNote:screenRecording: instead." );
245271
246272/* *
247- @brief Sets the default value of the user's email and hides the email field from the reporting UI.
273+ @brief Sets the default value of the user's email and hides the email field from the reporting UI and set the user's name to be included with all reports.
274+
275+ @discussion It also reset the chats on device to that email and removes user attributes, user data and completed surveys.
276+
277+ @param email Email address to be set as the user's email.
278+ @param name Name of the user to be set.
279+ */
280+ + (void )identifyUserWithEmail : (NSString *)email name : (NSString *)name ;
281+
282+ /* *
283+ @brief Sets the default value of the user's email to nil and show email field and remove user name from all reports
248284
285+ @discussion It also reset the chats on device and removes user attributes, user data and completed surveys.
286+ */
287+ + (void )logOut ;
288+
289+ /* *
290+ @brief Sets the default value of the user's email and hides the email field from the reporting UI.
291+
249292 @discussion Defaults to an empty string.
250293
251294 @param userEmail An email address to be set as the user's email.
252295 */
253- + (void )setUserEmail : (NSString *)userEmail ;
296+ + (void )setUserEmail : (NSString *)userEmail DEPRECATED_MSG_ATTRIBUTE( " Use identifyUserWithEmail:Name: instead. " ) ;
254297
255298/* *
256299 @brief Sets the default value of the user's name to be included with all reports.
@@ -259,7 +302,16 @@ NS_ASSUME_NONNULL_BEGIN
259302
260303 @param userName Name of the user to be set.
261304 */
262- + (void )setUserName : (NSString *)userName ;
305+ + (void )setUserName : (NSString *)userName DEPRECATED_MSG_ATTRIBUTE(" Use identifyUserWithEmail:Name: instead." );
306+
307+ /* *
308+ @brief Shows/Hides email field.
309+
310+ @discussion Defaults to show email field.
311+
312+ @param isShowingEmailField YES to show the email field, NO to hide it.
313+ */
314+ + (void )setShowEmailField : (BOOL )isShowingEmailField ;
263315
264316/* *
265317 @brief Enables/disables screenshot view when reporting a bug/improvement.
@@ -609,6 +661,13 @@ NS_ASSUME_NONNULL_BEGIN
609661 */
610662+ (nullable NSDictionary *)userAttributes ;
611663
664+ /* *
665+ @brief Enables/disables inspect view hierarchy when reporting a bug/feedback.
666+
667+ @param viewHierarchyEnabled A boolean to set whether view hierarchy are enabled or disabled.
668+ */
669+ + (void )setViewHierarchyEnabled : (BOOL )viewHierarchyEnabled ;
670+
612671// / -------------------
613672// / @name SDK Reporting
614673// / -------------------
@@ -620,6 +679,13 @@ NS_ASSUME_NONNULL_BEGIN
620679 */
621680+ (void )reportException : (NSException *)exception ;
622681
682+ /* *
683+ @brief Report an error manually.
684+
685+ @param error error to be reported.
686+ */
687+ + (void )reportError : (NSError *)error ;
688+
623689// / --------------------------
624690// / @name In-App Conversations
625691// / --------------------------
@@ -672,6 +738,25 @@ NS_ASSUME_NONNULL_BEGIN
672738 */
673739+ (void )didReceiveRemoteNotification : (NSDictionary *)userInfo ;
674740
741+ /* *
742+ @brief Logs a user event that happens through the lifecycle of the application.
743+
744+ @discussion Logged user events are going to be sent with each report, as well as at the end of a session.
745+
746+ @param name Event name.
747+ */
748+ + (void )logUserEventWithName : (NSString *)name ;
749+
750+ /* *
751+ @brief Logs a user event that happens through the lifecycle of the application.
752+
753+ @discussion Logged user events are going to be sent with each report, as well as at the end of a session.
754+
755+ @param name Event name.
756+ @param params An optional dictionary or parameters to be associated with the event.
757+ */
758+ + (void )logUserEventWithName : (NSString *)name params : (nullable NSDictionary *)params ;
759+
675760#pragma mark - IBGLog
676761
677762/* *
@@ -857,5 +942,14 @@ OBJC_EXTERN void IBGLogError(NSString *format, ...) NS_FORMAT_FUNCTION(1, 2);
857942 */
858943+ (void )setNetworkLoggingURLObfuscationHandler : (nonnull NSURL * (^)(NSURL * _Nonnull url))obfuscationHandler ;
859944
945+ #pragma mark - SDK Debugging
946+
947+ /* *
948+ @brief Sets the verbosity level of logs used to debug the Instabug SDK itself.
949+
950+ @param level Logs verbosity level.
951+ */
952+ + (void )setSDKDebugLogsLevel : (IBGSDKDebugLogsLevel)level ;
953+
860954@end
861955NS_ASSUME_NONNULL_END
0 commit comments