Skip to content

Commit d9a86a4

Browse files
authored
:hanndshake: Merge pull request #3 from Instabug/feature/2.7.1_new_apis
Feature/2.7.1 new apis
2 parents 249ab75 + fa658f0 commit d9a86a4

32 files changed

+121
-71
lines changed

android/build.gradle

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

2222
dependencies {
2323
compile 'com.facebook.react:react-native:0.20.+'
24-
compile ('com.instabug.library:instabug:4.11.1'){
24+
compile ('com.instabug.library:instabug:4.11.2'){
2525
exclude group: 'com.android.support'
2626
}
2727

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.instabug.library.user.UserEventParam;
3434
import com.instabug.library.OnSdkDismissedCallback;
3535
import com.instabug.library.bugreporting.model.Bug;
36+
import com.instabug.library.visualusersteps.State;
3637
import com.instabug.survey.InstabugSurvey;
3738

3839
import com.instabug.reactlibrary.utils.ArrayUtil;
@@ -93,6 +94,11 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
9394
private final String EXTENDED_BUG_REPORT_OPTIONAL_FIELDS = "enabledWithOptionalFields";
9495
private final String EXTENDED_BUG_REPORT_DISABLED = "disabled";
9596

97+
//Instabug repro step modes
98+
private final String ENABLED_WITH_NO_SCREENSHOTS = "enabledWithNoScreenshots";
99+
private final String ENABLED = "enabled";
100+
private final String DISABLED = "disabled";
101+
96102
//Theme colors
97103
private final String COLOR_THEME_LIGHT = "light";
98104
private final String COLOR_THEME_DARK = "dark";
@@ -1226,6 +1232,34 @@ public void clearFileAttachment() {
12261232
}
12271233
}
12281234

1235+
/**
1236+
* Sets whether user steps tracking is visual, non visual or disabled.
1237+
*
1238+
* @param reproStepsMode A string to set user steps tracking to be
1239+
* enabled, non visual or disabled.
1240+
*/
1241+
@ReactMethod
1242+
public void setReproStepsMode(String reproStepsMode) {
1243+
try {
1244+
switch(reproStepsMode) {
1245+
case ENABLED_WITH_NO_SCREENSHOTS:
1246+
Instabug.setReproStepsState(State.ENABLED_WITH_NO_SCREENSHOTS);
1247+
break;
1248+
case ENABLED:
1249+
Instabug.setReproStepsState(State.ENABLED);
1250+
break;
1251+
case DISABLED:
1252+
Instabug.setReproStepsState(State.DISABLED);
1253+
break;
1254+
default:
1255+
Instabug.setReproStepsState(State.ENABLED);
1256+
}
1257+
1258+
} catch (Exception e) {
1259+
e.printStackTrace();
1260+
}
1261+
}
1262+
12291263
/**
12301264
* Sets the threshold value of the shake gesture for android devices.
12311265
* Default for android is an integer value equals 350.
@@ -1474,6 +1508,10 @@ public Map<String, Object> getConstants() {
14741508
constants.put("enabledWithOptionalFields", EXTENDED_BUG_REPORT_OPTIONAL_FIELDS);
14751509
constants.put("disabled", EXTENDED_BUG_REPORT_DISABLED);
14761510

1511+
constants.put("reproStepsEnabledWithNoScreenshots", ENABLED_WITH_NO_SCREENSHOTS);
1512+
constants.put("reproStepsEnabled", ENABLED);
1513+
constants.put("reproStepsDisabled", DISABLED);
1514+
14771515
constants.put("shakeHint", SHAKE_HINT);
14781516
constants.put("swipeHint", SWIPE_HINT);
14791517
constants.put("invalidEmailMessage", INVALID_EMAIL_MESSAGE);

index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,18 @@ module.exports = {
670670
}
671671
},
672672

673+
/**
674+
* Sets whether user steps tracking is visual, non visual or disabled.
675+
* User Steps tracking is enabled by default if it's available
676+
* in your current plan.
677+
*
678+
* @param {reproStepsMode} reproStepsMode An enum to set user steps tracking
679+
* to be enabled, non visual or disabled.
680+
*/
681+
setReproStepsMode: function (reproStepsMode) {
682+
Instabug.setReproStepsMode(reproStepsMode);
683+
},
684+
673685
/**
674686
* Sets user attribute to overwrite it's value or create a new one if it doesn't exist.
675687
*
@@ -910,7 +922,7 @@ module.exports = {
910922
reproStepsMode: {
911923
enabled: Instabug.reproStepsEnabled,
912924
disabled: Instabug.reproStepsDisabled,
913-
enabledWithNoScreenshot: Instabug.reproStepsEnabledWithNoScreenshot,
925+
enabledWithNoScreenshots: Instabug.reproStepsEnabledWithNoScreenshots,
914926
},
915927

916928
/**

ios/Instabug.framework/Headers/Instabug.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.10
8+
Version: 7.10.1
99
*/
1010

1111
#import <Foundation/Foundation.h>

ios/Instabug.framework/Info.plist

2 Bytes
Binary file not shown.

ios/Instabug.framework/Instabug

0 Bytes
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-
EW0LawU2ocbTJXyXab6eGuYBqIg=
9+
FXGwngWRcYOFi0T4tL2KdxlGUjw=
1010
</data>
1111
<key>Info.plist</key>
1212
<data>
13-
uPr3dFdFtDxfIr/Z4Ak4dMZUtXU=
13+
j7YBrXxPdubzZ6bNCoQpUGSt9Ps=
1414
</data>
1515
<key>Modules/module.modulemap</key>
1616
<data>
@@ -23,11 +23,11 @@
2323
<dict>
2424
<key>hash</key>
2525
<data>
26-
EW0LawU2ocbTJXyXab6eGuYBqIg=
26+
FXGwngWRcYOFi0T4tL2KdxlGUjw=
2727
</data>
2828
<key>hash2</key>
2929
<data>
30-
1QgezJN+NvpRWcOOsFWXKUZJT723WvQT5vRR6J+lA/Y=
30+
q5gMkf8yDUe0ic4LGgKu6eHW6DceEAnkLcLrx6H5/TA=
3131
</data>
3232
</dict>
3333
<key>Modules/module.modulemap</key>

ios/InstabugCore.framework/Headers/IBGTypes.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.10
8+
Version: 7.10.1
99
*/
1010

1111
#import <UIKit/UIKit.h>

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.10
8+
Version: 7.10.1
99
*/
1010

1111
#import <Foundation/Foundation.h>
-2 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.
Binary file not shown.
3 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
4 Bytes
Binary file not shown.
-2 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.
Binary file not shown.

ios/InstabugCore.framework/Info.plist

2 Bytes
Binary file not shown.
64 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)