Skip to content

Commit 6f9cd7c

Browse files
authored
🤝 Merge pull request #10 from Instabug/feature/2.13_release
Feature/2.13 release
2 parents 4e47d66 + e618e50 commit 6f9cd7c

File tree

61 files changed

+363
-191
lines changed

Some content is hidden

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

61 files changed

+363
-191
lines changed

android/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ android {
2121

2222
dependencies {
2323
compile 'com.facebook.react:react-native:0.20.+'
24-
compile ('com.instabug.library:instabug:4.13.5'){
24+
compile ('com.instabug.library:instabug:4.15.1'){
2525
exclude group: 'com.android.support:appcompat-v7'
2626
}
27-
2827
}

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.instabug.library.invocation.util.InstabugVideoRecordingButtonCorner;
3131
import com.instabug.library.logging.InstabugLog;
3232
import com.instabug.library.bugreporting.model.ReportCategory;
33+
import com.instabug.library.ui.onboarding.WelcomeMessage;
3334
import com.instabug.library.InstabugCustomTextPlaceHolder;
3435
import com.instabug.library.user.UserEventParam;
3536
import com.instabug.library.OnSdkDismissedCallback;
@@ -106,6 +107,11 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
106107
private final String ENABLED = "enabled";
107108
private final String DISABLED = "disabled";
108109

110+
//Instabug welcome message modes
111+
private final String WELCOME_MESSAGE_MODE_LIVE = "welcomeMessageModeLive";
112+
private final String WELCOME_MESSAGE_MODE_BETA = "welcomeMessageModeBeta";
113+
private final String WELCOME_MESSAGE_MODE_DISABLED = "welcomeMessageModeDisabled";
114+
109115
//Theme colors
110116
private final String COLOR_THEME_LIGHT = "light";
111117
private final String COLOR_THEME_DARK = "dark";
@@ -1360,6 +1366,59 @@ public void setReproStepsMode(String reproStepsMode) {
13601366
}
13611367
}
13621368

1369+
/**
1370+
* Shows the welcome message in a specific mode.
1371+
*
1372+
* @param welcomeMessageMode An enum to set the welcome message mode to
1373+
* live, or beta.
1374+
*/
1375+
@ReactMethod
1376+
public void showWelcomeMessageWithMode(String welcomeMessageMode) {
1377+
try {
1378+
switch (welcomeMessageMode) {
1379+
case WELCOME_MESSAGE_MODE_LIVE:
1380+
Instabug.showWelcomeMessage(WelcomeMessage.State.LIVE);
1381+
break;
1382+
case WELCOME_MESSAGE_MODE_BETA:
1383+
Instabug.showWelcomeMessage(WelcomeMessage.State.BETA);
1384+
break;
1385+
default:
1386+
Instabug.showWelcomeMessage(WelcomeMessage.State.LIVE);
1387+
}
1388+
1389+
} catch (Exception e) {
1390+
e.printStackTrace();
1391+
}
1392+
}
1393+
1394+
/**
1395+
* Sets the welcome message mode to live, beta or disabled.
1396+
*
1397+
* @param welcomeMessageMode An enum to set the welcome message mode to
1398+
* live, beta or disabled.
1399+
*/
1400+
@ReactMethod
1401+
public void setWelcomeMessageMode(String welcomeMessageMode) {
1402+
try {
1403+
switch (welcomeMessageMode) {
1404+
case WELCOME_MESSAGE_MODE_LIVE:
1405+
Instabug.showWelcomeMessage(WelcomeMessage.State.LIVE);
1406+
break;
1407+
case WELCOME_MESSAGE_MODE_BETA:
1408+
Instabug.showWelcomeMessage(WelcomeMessage.State.BETA);
1409+
break;
1410+
case WELCOME_MESSAGE_MODE_DISABLED:
1411+
Instabug.showWelcomeMessage(WelcomeMessage.State.DISABLED);
1412+
break;
1413+
default:
1414+
Instabug.showWelcomeMessage(WelcomeMessage.State.LIVE);
1415+
}
1416+
1417+
} catch (Exception e) {
1418+
e.printStackTrace();
1419+
}
1420+
}
1421+
13631422
/**
13641423
* Sets the threshold value of the shake gesture for android devices.
13651424
* Default for android is an integer value equals 350.
@@ -1719,6 +1778,10 @@ public Map<String, Object> getConstants() {
17191778
constants.put("reproStepsEnabled", ENABLED);
17201779
constants.put("reproStepsDisabled", DISABLED);
17211780

1781+
constants.put("welcomeMessageModeLive", WELCOME_MESSAGE_MODE_LIVE);
1782+
constants.put("welcomeMessageModeBeta", WELCOME_MESSAGE_MODE_BETA);
1783+
constants.put("welcomeMessageModeDisabled", WELCOME_MESSAGE_MODE_DISABLED);
1784+
17221785
constants.put("allActions", ACTION_TYPE_ALL_ACTIONS);
17231786
constants.put("reportBugAction", ACTION_TYPE_REPORT_BUG);
17241787
constants.put("requestNewFeature", ACTION_TYPE_REQUEST_NEW_FEATURE);

index.js

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ module.exports = {
215215
},
216216

217217
/**
218+
* @deprecated Use {@link showWelcomeMessage} instead.
218219
* Present a view that educates the user on how to invoke the SDK with the
219220
* currently set invocation event.
220221
*/
@@ -286,6 +287,7 @@ module.exports = {
286287
},
287288

288289
/**
290+
* @deprecated Use {@link setEmailFieldRequiredForActions} instead.
289291
* Sets whether users are required to enter an email address or not when
290292
* sending reports.
291293
* Defaults to YES.
@@ -297,7 +299,6 @@ module.exports = {
297299
},
298300

299301
/**
300-
* @deprecated since version 2.3.0. Use {@link setEnabledAttachmentTypes} instead.
301302
* Sets whether users are required to enter an email address or not when
302303
* sending reports.
303304
* Defaults to YES.
@@ -993,6 +994,26 @@ module.exports = {
993994
Instabug.setShouldShowSurveysWelcomeScreen(shouldShowWelcomeScreen);
994995
},
995996

997+
/**
998+
* Shows the welcome message in a specific mode.
999+
* @param welcomeMessageMode An enum to set the welcome message mode to
1000+
* live, or beta.
1001+
*
1002+
*/
1003+
showWelcomeMessage: function(welcomeMessageMode) {
1004+
Instabug.showWelcomeMessageWithMode(welcomeMessageMode);
1005+
},
1006+
1007+
/**
1008+
* Sets the welcome message mode to live, beta or disabled.
1009+
* @param welcomeMessageMode An enum to set the welcome message mode to
1010+
* live, beta or disabled.
1011+
*
1012+
*/
1013+
setWelcomeMessageMode: function(welcomeMessageMode) {
1014+
Instabug.setWelcomeMessageMode(welcomeMessageMode);
1015+
},
1016+
9961017
/**
9971018
* The event used to invoke the feedback form
9981019
* @readonly
@@ -1120,6 +1141,17 @@ module.exports = {
11201141
topLeft: Instabug.topLeft
11211142
},
11221143

1144+
/**
1145+
* The welcome message mode.
1146+
* @readonly
1147+
* @enum {number}
1148+
*/
1149+
welcomeMessageMode: {
1150+
live: Instabug.welcomeMessageModeLive,
1151+
beta: Instabug.welcomeMessageModeBeta,
1152+
disabled: Instabug.welcomeMessageModeDisabled
1153+
},
1154+
11231155
/**
11241156
* Instabug action types.
11251157
* @readonly

ios/Instabug.framework/Headers/Instabug.h

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Copyright: (c) 2013-2018 by Instabug, Inc., all rights reserved.
77
8-
Version: 7.12.7
8+
Version: 7.14.2
99
*/
1010

1111
#import <Foundation/Foundation.h>
@@ -330,7 +330,27 @@ typedef void (^NetworkObfuscationCompletionBlock)(NSData *data, NSURLResponse *r
330330
331331
@discussion Does nothing if invocation event is set to anything other than IBGInvocationEventShake or IBGInvocationEventScreenshot.
332332
*/
333-
+ (void)showIntroMessage;
333+
+ (void)showIntroMessage DEPRECATED_MSG_ATTRIBUTE("Use showWelcomeMessageWithMode: instead.");
334+
335+
/**
336+
@brief Shows the welcome message in a specific mode.
337+
338+
@discussion By default, the welcome message live mode is enabled. It appears automatically after 10 seconds from the user's first session. You can show it manually in a specific mode through this API.
339+
The live mode consists of one step to inform the users how to report a bug or feedback. The beta mode consists of three steps to welcome your testers on board, inform them how to report a bug or feedback and to motivate them to always be on the latest app version. Please note, the into message appears only if the invocation event isn't set to none.
340+
341+
@param welcomeMessageMode An enum to set the welcome message mode to live, beta or disabled.
342+
*/
343+
+ (void)showWelcomeMessageWithMode:(IBGWelcomeMessageMode)welcomeMessageMode;
344+
345+
/**
346+
@brief Sets the welcome message mode to live, beta or disabled.
347+
348+
@discussion By default, the welcome message live mode is enabled. It appears automatically after 10 seconds from the user's first session. You can change it to the beta mode or disable it.
349+
The live mode consists of one step to inform the users how to report a bug or feedback. The beta mode consists of three steps to welcome your testers on board, inform them how to report a bug or feedback and to motivate them to always be on the latest app version. Please note, the into message appears only if the invocation event isn't set to none.
350+
351+
@param welcomeMessageMode An enum to set the welcome message mode to live, beta or disabled.
352+
*/
353+
+ (void)setWelcomeMessageMode:(IBGWelcomeMessageMode)welcomeMessageMode;
334354

335355
/**
336356
@brief Enables/disables the attachment of an initial screenshot when reporting a bug/improvement.
@@ -386,15 +406,15 @@ typedef void (^NetworkObfuscationCompletionBlock)(NSData *data, NSURLResponse *r
386406

387407
/**
388408
@brief Enables/disables screenshot view when reporting a bug/improvement.
389-
409+
390410
@deprecated Starting from v6.0, use `setWillSkipScreenshotAnnotation:` instead.
391-
411+
392412
@discussion By default, screenshot view is shown when reporting a bug, but not when sending feedback.
393-
413+
394414
@param willShowScreenshotView A boolean to set whether screenshot view is shown or not. Passing YES will show
395415
screenshot view for both feedback and bug reporting, while passing NO will disable it for both.
396416
*/
397-
+ (void)setWillShowScreenshotView:(BOOL)willShowScreenshotView DEPRECATED_MSG_ATTRIBUTE("Starting from v6.0, use setWillSkipScreenshotAnnotation: instead.");
417+
+ (void)setWillShowScreenshotView:(BOOL)willShowScreenshotView DEPRECATED_MSG_ATTRIBUTE("This API has no effect now and will be removed soon");
398418

399419
/**
400420
@brief Enables/disables screenshot view when reporting a bug/improvement.
@@ -404,7 +424,7 @@ typedef void (^NetworkObfuscationCompletionBlock)(NSData *data, NSURLResponse *r
404424
@param willSkipScreenShot A boolean to set whether screenshot view is shown or not. Passing YES will show
405425
screenshot view for both feedback and bug reporting, while passing NO will disable it for both.
406426
*/
407-
+ (void)setWillSkipScreenshotAnnotation:(BOOL)willSkipScreenShot;
427+
+ (void)setWillSkipScreenshotAnnotation:(BOOL)willSkipScreenShot DEPRECATED_MSG_ATTRIBUTE("This API has no effect now and will be removed soon");
408428

409429
/**
410430
@brief Returns the number of unread messages the user currently has.
@@ -477,7 +497,7 @@ typedef void (^NetworkObfuscationCompletionBlock)(NSData *data, NSURLResponse *r
477497
478498
@param isCommentFieldRequired A boolean to indicate whether comment field is required or not.
479499
*/
480-
+ (void)setCommentFieldRequired:(BOOL)isCommentFieldRequired;
500+
+ (void)setCommentFieldRequired:(BOOL)isCommentFieldRequired DEPRECATED_MSG_ATTRIBUTE("Use setEmailFieldRequired:forAction: instead");
481501

482502
/**
483503
@brief Sets the threshold value of the shake gesture for iPhone/iPod Touch and iPad.
@@ -530,7 +550,7 @@ typedef void (^NetworkObfuscationCompletionBlock)(NSData *data, NSURLResponse *r
530550
531551
@param isIntroMessageEnabled A boolean to indicate whether the intro message is enabled or not.
532552
*/
533-
+ (void)setIntroMessageEnabled:(BOOL)isIntroMessageEnabled;
553+
+ (void)setIntroMessageEnabled:(BOOL)isIntroMessageEnabled DEPRECATED_MSG_ATTRIBUTE("Use setWelcomeMessageMode: instead.");
534554

535555
/**
536556
@brief Sets whether to show a "Thank You" dialog after a bug report is sent or not.

ios/Instabug.framework/Info.plist

0 Bytes
Binary file not shown.

ios/Instabug.framework/Instabug

1.25 MB
Binary file not shown.

ios/Instabug.framework/_CodeSignature/CodeResources

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<dict>
77
<key>Headers/Instabug.h</key>
88
<data>
9-
SGNYZhDFT2EX7GCTETfClZTQXJY=
9+
0VzQNGUhwwUakHtSZk/sVjnclBI=
1010
</data>
1111
<key>Info.plist</key>
1212
<data>
13-
/nPkkrY39eMx9p9uHRbBsHajFMw=
13+
wvwESL9sbWgpOnPmqR1ukQ1GKX0=
1414
</data>
1515
<key>Modules/module.modulemap</key>
1616
<data>
@@ -23,11 +23,11 @@
2323
<dict>
2424
<key>hash</key>
2525
<data>
26-
SGNYZhDFT2EX7GCTETfClZTQXJY=
26+
0VzQNGUhwwUakHtSZk/sVjnclBI=
2727
</data>
2828
<key>hash2</key>
2929
<data>
30-
WKOlkyFQLVjgThj0Q+rMJ+iJKaRVVs+lV56Ly76ap58=
30+
HEd4105lVuHD52iHHDs6y5hpz7RKXt8ADlKZLSomPd4=
3131
</data>
3232
</dict>
3333
<key>Modules/module.modulemap</key>

ios/InstabugCore.framework/Assets.car

564 KB
Binary file not shown.

ios/InstabugCore.framework/Headers/IBGTypes.h

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Copyright: (c) 2013-2018 by Instabug, Inc., all rights reserved.
77
8-
Version: 7.12.7
8+
Version: 7.14.2
99
*/
1010

1111
#import <UIKit/UIKit.h>
@@ -21,6 +21,16 @@ extern NSString * const kIBGShakeStartAlertTextStringName;
2121
extern NSString * const kIBGTwoFingerSwipeStartAlertTextStringName;
2222
extern NSString * const kIBGEdgeSwipeStartAlertTextStringName;
2323
extern NSString * const kIBGScreenshotStartAlertTextStringName;
24+
extern NSString * const kIBGFloatingButtonStartAlertTextStringName;
25+
extern NSString * const kIBGBetaWelcomeMessageWelcomeStepTitle;
26+
extern NSString * const kIBGBetaWelcomeMessageWelcomeStepContent;
27+
extern NSString * const kIBGBetaWelcomeMessageHowToReportStepTitle;
28+
extern NSString * const kIBGBetaWelcomeMessageHowToReportStepContent;
29+
extern NSString * const kIBGBetaWelcomeMessageFinishStepTitle;
30+
extern NSString * const kIBGBetaWelcomeMessageFinishStepContent;
31+
extern NSString * const kIBGBetaWelcomeDoneButtonTitle;
32+
extern NSString * const kIBGLiveWelcomeMessageTitle;
33+
extern NSString * const kIBGLiveWelcomeMessageContent;
2434
extern NSString * const kIBGInvalidEmailMessageStringName;
2535
extern NSString * const kIBGInvalidEmailTitleStringName;
2636
extern NSString * const kIBGInvalidCommentMessageStringName;
@@ -130,6 +140,11 @@ extern NSString * const kIBGExpectedResultsStringName;
130140
extern NSString * const kIBGActualResultsStringName;
131141
extern NSString * const kIBGStepsToReproduceStringName;
132142
extern NSString * const kIBGReplyButtonTitleStringName;
143+
extern NSString * const kIBGAddAttachmentButtonTitleStringName;
144+
extern NSString * const kIBGDiscardAlertTitle;
145+
extern NSString * const kIBGDiscardAlertMessage;
146+
extern NSString * const kIBGDiscardAlertAction;
147+
extern NSString * const kIBGDiscardAlertCancel;
133148

134149
/// -----------
135150
/// @name Enums
@@ -267,7 +282,18 @@ typedef NS_ENUM(NSInteger, IBGString) {
267282
IBGStringShakeHint,
268283
IBGStringSwipeHint,
269284
IBGStringEdgeSwipeStartHint,
285+
IBGStringScreenshotHint,
286+
IBGStringFloatingButtonHint,
270287
IBGStringStartAlertText,
288+
IBGBetaWelcomeMessageWelcomeStepTitle,
289+
IBGBetaWelcomeMessageWelcomeStepContent,
290+
IBGBetaWelcomeMessageHowToReportStepTitle,
291+
IBGBetaWelcomeMessageHowToReportStepMessage,
292+
IBGBetaWelcomeMessageFinishStepTitle,
293+
IBGBetaWelcomeMessageFinishStepContent,
294+
IBGBetaWelcomeDoneButtonTitle,
295+
IBGLiveWelcomeMessageTitle,
296+
IBGLiveWelcomeMessageMessage,
271297
IBGStringInvalidEmailMessage,
272298
IBGStringInvalidEmailTitle,
273299
IBGStringInvalidCommentMessage,
@@ -362,7 +388,12 @@ typedef NS_ENUM(NSInteger, IBGString) {
362388
IBGExpectedResultsStringName,
363389
IBGActualResultsStringName,
364390
IBGStepsToReproduceStringName,
365-
IBGReplyButtonTitleStringName
391+
IBGReplyButtonTitleStringName,
392+
IBGAddAttachmentButtonTitleStringName,
393+
IBGDiscardAlertTitleStringName,
394+
IBGDiscardAlertMessageStringName,
395+
IBGDiscardAlertActionStringName,
396+
IBGDiscardAlertCancelStringName
366397
};
367398

368399
/**
@@ -424,6 +455,15 @@ typedef NS_ENUM(NSInteger, IBGExtendedBugReportMode) {
424455
IBGExtendedBugReportModeDisabled
425456
};
426457

458+
/**
459+
The welcome message mode.
460+
*/
461+
typedef NS_ENUM(NSInteger, IBGWelcomeMessageMode) {
462+
IBGWelcomeMessageModeLive,
463+
IBGWelcomeMessageModeBeta,
464+
IBGWelcomeMessageModeDisabled
465+
};
466+
427467
typedef enum : NSUInteger {
428468
IBGActionAllActions = 1 << 0,
429469
IBGActionReportBug = 1 << 1,

ios/InstabugCore.framework/Headers/InstabugCore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Copyright: (c) 2013-2018 by Instabug, Inc., all rights reserved.
77
8-
Version: 7.12.7
8+
Version: 7.14.2
99
*/
1010

1111
#import <Foundation/Foundation.h>
-19 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-7.97 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
-3 Bytes
Binary file not shown.
Binary file not shown.
2 Bytes
Binary file not shown.
Binary file not shown.
-77 Bytes
Binary file not shown.
-13 Bytes
Binary file not shown.
226 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

ios/InstabugCore.framework/Info.plist

0 Bytes
Binary file not shown.
1.15 MB
Binary file not shown.

0 commit comments

Comments
 (0)