Skip to content

Commit b2c1902

Browse files
authored
🤝 Merge pull request #115 from Instabug/feature/2.5_new_apis
Feature/2.5 new apis
2 parents 20fde87 + 76cec53 commit b2c1902

35 files changed

+139
-77
lines changed

android/build.gradle

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

2222
dependencies {
2323
compile 'com.facebook.react:react-native:0.20.+'
24-
compile 'com.instabug.library:instabug:4.8.1'
24+
compile 'com.instabug.library:instabug:4.9.0'
2525

2626
}

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.facebook.react.bridge.Callback;
2020

2121
import com.facebook.react.modules.core.DeviceEventManagerModule;
22+
import com.instabug.library.Feature;
2223
import com.instabug.library.Instabug;
2324
import com.instabug.library.internal.module.InstabugLocale;
2425
import com.instabug.library.invocation.InstabugInvocationEvent;
@@ -247,6 +248,20 @@ public void changeLocale(String instabugLocale) {
247248
}
248249
}
249250

251+
@ReactMethod
252+
public void setViewHierarchyEnabled(boolean enabled) {
253+
try {
254+
if(enabled) {
255+
Instabug.setViewHierarchyState(Feature.State.ENABLED);
256+
} else {
257+
258+
Instabug.setViewHierarchyState(Feature.State.DISABLED);
259+
}
260+
} catch (Exception e) {
261+
e.printStackTrace();
262+
}
263+
}
264+
250265
/**
251266
* Sets the default corner at which the video recording floating button will be shown
252267
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.instabug.library.InstabugColorTheme;
1313
import com.instabug.library.invocation.InstabugInvocationEvent;
1414
import com.instabug.library.invocation.util.InstabugFloatingButtonEdge;
15+
import com.instabug.library.visualusersteps.State;
1516
import android.graphics.Color;
1617

1718
import java.util.ArrayList;
@@ -56,6 +57,7 @@ public RNInstabugReactnativePackage(String androidApplicationToken, Application
5657
mInstabug = new Instabug.Builder(this.androidApplication, this.mAndroidApplicationToken)
5758
.setInvocationEvent(this.invocationEvent)
5859
.setCrashReportingState(Feature.State.DISABLED)
60+
.setReproStepsState(State.DISABLED)
5961
.build();
6062

6163
Instabug.setPrimaryColor(Color.parseColor(primaryColor));

index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,9 +690,7 @@ module.exports = {
690690
* @param {boolean} viewHierarchyEnabled A boolean to set whether view hierarchy are enabled or disabled.
691691
*/
692692
setViewHierarchyEnabled: function (viewHierarchyEnabled) {
693-
if (Platform.OS === 'ios') {
694-
Instabug.setViewHierarchyEnabled(viewHierarchyEnabled);
695-
}
693+
Instabug.setViewHierarchyEnabled(viewHierarchyEnabled);
696694
},
697695

698696
/**
@@ -863,6 +861,17 @@ module.exports = {
863861
floatingButton: Instabug.invocationEventFloatingButton
864862
},
865863

864+
/**
865+
* The user steps option.
866+
* @readonly
867+
* @enum {number}
868+
*/
869+
reproStepsMode: {
870+
enabled: Instabug.reproStepsEnabled,
871+
disabled: Instabug.reproStepsDisabled,
872+
enabledWithNoScreenshot: Instabug.reproStepsEnabledWithNoScreenshot,
873+
},
874+
866875
/**
867876
* Type of SDK dismiss
868877
* @readonly

ios/Instabug.framework/Headers/Instabug.h

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

1111
#import <Foundation/Foundation.h>
@@ -160,6 +160,18 @@ typedef void (^NetworkObfuscationCompletionBlock)(NSData *data, NSURLResponse *r
160160
*/
161161
+ (void)setUserStepsEnabled:(BOOL)isUserStepsEnabled;
162162

163+
/**
164+
@brief Sets whether user steps tracking is visual, non visula or disabled.
165+
166+
@discussion Enabling user steps would give you an insight on the scenario a user has performed before encountering a
167+
bug or a crash. User steps are attached with each report being sent.
168+
169+
User Steps tracking is enabled by default if it's available in your current plan.
170+
171+
@param userStepsMode An enum to set user steps tracking to be enabled , non visual or disabled.
172+
*/
173+
+ (void)setReproStepsMode:(IBGUserStepsMode)userStepsMode;
174+
163175
/**
164176
@brief Sets whether to track and report crashes or not.
165177

ios/Instabug.framework/Info.plist

-2 Bytes
Binary file not shown.

ios/Instabug.framework/Instabug

240 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-
dv9gxbikDAknu/WGzN8gkc/4u1w=
9+
7FmPOnvoZEOelRoF+rakHgJyT1E=
1010
</data>
1111
<key>Info.plist</key>
1212
<data>
13-
PqPlFUga6XC2bwuhVcghAFTYUrk=
13+
Hdm1Q2muThmGWWJRk3FelfsOPV0=
1414
</data>
1515
<key>Modules/module.modulemap</key>
1616
<data>
@@ -23,11 +23,11 @@
2323
<dict>
2424
<key>hash</key>
2525
<data>
26-
dv9gxbikDAknu/WGzN8gkc/4u1w=
26+
7FmPOnvoZEOelRoF+rakHgJyT1E=
2727
</data>
2828
<key>hash2</key>
2929
<data>
30-
Q8wTarNHp6QYAK/yMLfV3pYSGDqe2DwJ1aNPIzdKKLk=
30+
5xZDYfSvxBVD8Xgv2mFfPXWRhCe78P/MG6sCti+sFec=
3131
</data>
3232
</dict>
3333
<key>Modules/module.modulemap</key>

ios/InstabugCore.framework/Headers/IBGTypes.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,16 @@ typedef NS_ENUM(NSInteger, IBGLogLevel) {
294294
};
295295

296296
/**
297-
The attachment types selected in Attachment action sheet.
297+
The user steps option.
298+
*/
299+
typedef NS_ENUM(NSInteger, IBGUserStepsMode) {
300+
IBGUserStepsModeEnable,
301+
IBGUserStepsModeEnabledWithNoScreenshots,
302+
IBGUserStepsModeDisable
303+
};
304+
305+
/**
306+
The attachment types selected in Attachment action sheet.
298307
*/
299308
typedef NS_OPTIONS(NSInteger, IBGAttachmentType) {
300309
IBGAttachmentTypeScreenShot = 1 << 1,
Binary file not shown.

0 commit comments

Comments
 (0)