Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ android {
}

dependencies {
compile 'com.instabug.library:instabug:4.8.1'
compile 'com.instabug.library:instabug:4.9.0'
compile 'com.android.support:multidex:1.0.0'
}
27 changes: 26 additions & 1 deletion src/android/IBGPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.net.Uri;
import android.util.Log;

import com.instabug.library.Feature;
import com.instabug.library.Instabug;
import com.instabug.library.invocation.InstabugInvocationEvent;
import com.instabug.library.invocation.InstabugInvocationMode;
Expand Down Expand Up @@ -159,7 +160,10 @@ public boolean execute(final String action, JSONArray args, final CallbackContex
} else if ("setVideoRecordingFloatingButtonPosition".equals(action)) {
setVideoRecordingFloatingButtonPosition(callbackContext, args.optString(0));

} else {
} else if ("setViewHierarchyEnabled".equals(action)) {
setViewHierarchyEnabled(callbackContext, args.optBoolean(0));

} else {
// Method not found.
return false;
}
Expand Down Expand Up @@ -532,6 +536,27 @@ private void setDebugEnabled(final CallbackContext callbackContext, boolean isDe
}
}

/**
* Enable/Disable view hierarchy from Instabug SDK
*
* @param isEnabled whether view hierarchy should be enabled or not
*
* @param callbackContext
* Used when calling back into JavaScript
*/
private void setViewHierarchyEnabled(final CallbackContext callbackContext, boolean isEnabled) {
try {
if(isEnabled) {
Instabug.setViewHierarchyState(Feature.State.ENABLED);
} else {
Instabug.setViewHierarchyState(Feature.State.DISABLED);
}
callbackContext.success();
} catch (IllegalStateException e) {
callbackContext.error(errorMsg);
}
}

/**
* Sets user attribute to overwrite it's value or create a new one if it doesn't exist.
*
Expand Down
65 changes: 65 additions & 0 deletions src/ios/IBGPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,29 @@ - (void) setLocale:(CDVInvokedUrlCommand*)command
[self.commandDelegate sendPluginResult:result callbackId:[command callbackId]];
}

/**
* Sets whether user steps tracking is visual, non visula or disabled.
*
* @param {CDVInvokedUrlCommand*} command
* The command sent from JavaScript
*/
- (void) setReproStepsMode:(CDVInvokedUrlCommand*)command
{
CDVPluginResult* result;

IBGUserStepsMode reproStepsMode = [self parseReproStepsMode:[command argumentAtIndex:0]];

if (reproStepsMode) {
[Instabug setReproStepsMode:reproStepsMode];
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
} else {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
messageAsString:@"A valid user steps mode must be provided."];
}

[self.commandDelegate sendPluginResult:result callbackId:[command callbackId]];
}

/**
* Convenience method for setting whether the email
* field is validated or not.
Expand Down Expand Up @@ -437,6 +460,29 @@ - (void) setDefaultInvocationMode:(NSString*)mode {
}
}

/**
* Enable/Disable view hierarchy from Instabug SDK
*
* @param {CDVInvokedUrlCommand*} command
* The command sent from JavaScript
*/
- (void) setViewHierarchyEnabled:(CDVInvokedUrlCommand*)command
{
CDVPluginResult* result;

BOOL isEnabled = [command argumentAtIndex:0];

if (isEnabled) {
[Instabug setViewHierarchyEnabled:isEnabled];
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
} else {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
messageAsString:@"A boolean value must be provided."];
}

[self.commandDelegate sendPluginResult:result callbackId:[command callbackId]];
}

/**
* Convenience method for setting the threshold value
* of the shake gesture for iPhone/iPod touch and iPad.
Expand Down Expand Up @@ -626,6 +672,25 @@ - (IBGInvocationMode) parseIBGPosition:(NSString*)position
} else return 0;
}


/**
* Convenience method for converting NSString to
* IBGUserStepsMode.
*
* @param {NSString*} mode
* NSString shortcode for IBGUserStepsMode
*/
- (IBGUserStepsMode) parseReproStepsMode:(NSString*)mode
{
if ([mode isEqualToString:@"enabled"]) {
return IBGUserStepsModeEnable;
} else if ([mode isEqualToString:@"disabled"]) {
return IBGUserStepsModeDisable;
} else if ([mode isEqualToString:@"enabledWithNoScreenshot"]) {
return IBGUserStepsModeEnabledWithNoScreenshots;
} else return 0;
}

/**
* Convenience method for converting NSString to
* IBGLocale.
Expand Down
14 changes: 13 additions & 1 deletion src/ios/Instabug.framework/Headers/Instabug.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Copyright: (c) 2013-2017 by Instabug, Inc., all rights reserved.

Version: 7.7.1
Version: 7.8
*/

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

/**
@brief Sets whether user steps tracking is visual, non visula or disabled.

@discussion Enabling user steps would give you an insight on the scenario a user has performed before encountering a
bug or a crash. User steps are attached with each report being sent.

User Steps tracking is enabled by default if it's available in your current plan.

@param userStepsMode An enum to set user steps tracking to be enabled , non visual or disabled.
*/
+ (void)setReproStepsMode:(IBGUserStepsMode)userStepsMode;

/**
@brief Sets whether to track and report crashes or not.

Expand Down
Binary file modified src/ios/Instabug.framework/Info.plist
Binary file not shown.
Binary file modified src/ios/Instabug.framework/Instabug
Binary file not shown.
8 changes: 4 additions & 4 deletions src/ios/Instabug.framework/_CodeSignature/CodeResources
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<dict>
<key>Headers/Instabug.h</key>
<data>
dv9gxbikDAknu/WGzN8gkc/4u1w=
7FmPOnvoZEOelRoF+rakHgJyT1E=
</data>
<key>Info.plist</key>
<data>
PqPlFUga6XC2bwuhVcghAFTYUrk=
Hdm1Q2muThmGWWJRk3FelfsOPV0=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand All @@ -23,11 +23,11 @@
<dict>
<key>hash</key>
<data>
dv9gxbikDAknu/WGzN8gkc/4u1w=
7FmPOnvoZEOelRoF+rakHgJyT1E=
</data>
<key>hash2</key>
<data>
Q8wTarNHp6QYAK/yMLfV3pYSGDqe2DwJ1aNPIzdKKLk=
5xZDYfSvxBVD8Xgv2mFfPXWRhCe78P/MG6sCti+sFec=
</data>
</dict>
<key>Modules/module.modulemap</key>
Expand Down
11 changes: 10 additions & 1 deletion src/ios/InstabugCore.framework/Headers/IBGTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,16 @@ typedef NS_ENUM(NSInteger, IBGLogLevel) {
};

/**
The attachment types selected in Attachment action sheet.
The user steps option.
*/
typedef NS_ENUM(NSInteger, IBGUserStepsMode) {
IBGUserStepsModeEnable,
IBGUserStepsModeEnabledWithNoScreenshots,
IBGUserStepsModeDisable
};

/**
The attachment types selected in Attachment action sheet.
*/
typedef NS_OPTIONS(NSInteger, IBGAttachmentType) {
IBGAttachmentTypeScreenShot = 1 << 1,
Expand Down
Binary file modified src/ios/InstabugCore.framework/IBGActionSheetCell.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGActionSheetVC-iPhone.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGAttachmentButton.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGBugVC-iPhone.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGChatCell.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGChatListVC-iPhone.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGChatVC-iPhone.nib
Binary file not shown.
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGMessagesView.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGPoweredByView.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGPromptCell.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGPromptVC-iPhone.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGReplyView-iPhone.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGReportCategoriesVC-iPhone.nib
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/IBGScreenshotVC-iPhone.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/Info.plist
Binary file not shown.
Binary file modified src/ios/InstabugCore.framework/InstabugCore
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading