Skip to content

Commit 0ff8c96

Browse files
authored
🤝 Merge pull request #4 from Instabug/feature/1.10_release
Feature/1.10 release
2 parents 7f14055 + f17c770 commit 0ff8c96

Some content is hidden

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

54 files changed

+227
-161
lines changed

build.gradle

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

2323
dependencies {
24-
compile 'com.instabug.library:instabug:4.11.2'
24+
compile 'com.instabug.library:instabug:4.12.1'
2525
compile 'com.android.support:multidex:1.0.0'
2626
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "instabug-cordova",
3-
"version": "1.9.0",
3+
"version": "1.9.1",
44
"description": "The purpose of this plugin is to simplify the process of integrating the Instabug SDK in a hybrid application, as well as to provide an interface to interfacing with the SDK through JavaScript.",
55
"main": "index.js",
66
"repository": {

plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
44
xmlns:android="http://schemas.android.com/apk/res/android"
5-
id="com.instabug.cordova.plugin"
6-
version="1.0.0">
5+
id="instabug-cordova"
6+
version="1.10.0">
77

88
<name>instabug-cordova</name>
99

src/android/IBGPlugin.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ public boolean execute(final String action, JSONArray args, final CallbackContex
177177
} else if ("setReproStepsMode".equals(action)) {
178178
setReproStepsMode(callbackContext, args.optString(0));
179179

180+
} else if ("setThresholdForReshowingSurveyAfterDismiss".equals(action)) {
181+
setThresholdForReshowingSurveyAfterDismiss(callbackContext, args.optInt(0), args.optInt(1));
182+
180183
} else {
181184
// Method not found.
182185
return false;
@@ -763,6 +766,28 @@ private void setReproStepsMode(final CallbackContext callbackContext, String rep
763766
}
764767
}
765768

769+
770+
/**
771+
* Set after how many sessions should the dismissed survey would show again.
772+
*
773+
* @param callbackContext
774+
* Used when calling back into JavaScript
775+
* @param sessionsCount
776+
* number of sessions that the dismissed survey will be shown after.
777+
* @param daysCount
778+
* number of days that the dismissed survey will show after.
779+
*/
780+
private void setThresholdForReshowingSurveyAfterDismiss(final CallbackContext callbackContext, int sessionsCount, int daysCount) {
781+
if (Math.signum(sessionsCount) != - 1 && Math.signum(daysCount) != - 1) {
782+
try {
783+
Instabug.setThresholdForReshowingSurveyAfterDismiss(sessionsCount, daysCount);
784+
callbackContext.success();
785+
} catch (IllegalStateException e) {
786+
callbackContext.error(errorMsg);
787+
}
788+
} else callbackContext.error("Session count and days count must be provided.");
789+
}
790+
766791
/**
767792
* Adds intent extras for all options passed to activate().
768793
*/

src/ios/IBGPlugin.m

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ - (void) setViewHierarchyEnabled:(CDVInvokedUrlCommand*)command
498498
BOOL isEnabled = [command argumentAtIndex:0];
499499

500500
if (isEnabled) {
501-
[Instabug setViewHierarchyEnabled:isEnabled];
501+
[Instabug setViewHierarchyEnabled:[[command argumentAtIndex:0] boolValue]];
502502
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
503503
} else {
504504
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
@@ -521,7 +521,7 @@ - (void) setAutoScreenRecordingEnabled:(CDVInvokedUrlCommand*)command
521521
BOOL isEnabled = [command argumentAtIndex:0];
522522

523523
if (isEnabled) {
524-
[Instabug setAutoScreenRecordingEnabled:isEnabled];
524+
[Instabug setAutoScreenRecordingEnabled:[[command argumentAtIndex:0] boolValue]];
525525
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
526526
} else {
527527
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
@@ -656,6 +656,55 @@ - (void) setColorTheme:(NSString*)theme
656656
}
657657
}
658658

659+
/**
660+
* Sets a threshold for numbers of sessions and another for number of days
661+
* required before a survey, that has been dismissed once, would show again.
662+
*
663+
* @param {CDVInvokedUrlCommand*} command
664+
* The command sent from JavaScript
665+
*/
666+
- (void) setThresholdForReshowingSurveyAfterDismiss:(CDVInvokedUrlCommand*)command
667+
{
668+
CDVPluginResult* result;
669+
670+
NSInteger sessionsCount = [[command argumentAtIndex:0] integerValue];
671+
NSInteger daysCount = [[command argumentAtIndex:1] integerValue];
672+
673+
if (sessionsCount && daysCount) {
674+
[Instabug setThresholdForReshowingSurveyAfterDismiss:sessionsCount daysCount:daysCount];
675+
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
676+
} else {
677+
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
678+
messageAsString:@"A sessions count and days count must be provided."];
679+
}
680+
681+
[self.commandDelegate sendPluginResult:result callbackId:[command callbackId]];
682+
}
683+
684+
/**
685+
* Sets a threshold for numbers of sessions and another for number of days
686+
* required before a survey, that has been dismissed once, would show again.
687+
*
688+
* @param {CDVInvokedUrlCommand*} command
689+
* The command sent from JavaScript
690+
*/
691+
- (void) setAutoShowingSurveysEnabled:(CDVInvokedUrlCommand*)command
692+
{
693+
CDVPluginResult* result;
694+
695+
BOOL autoShowingSurveysEnabled = [command argumentAtIndex:0];
696+
697+
if (autoShowingSurveysEnabled) {
698+
[Instabug setAutoShowingSurveysEnabled:[[command argumentAtIndex:0] boolValue]];
699+
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
700+
} else {
701+
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
702+
messageAsString:@"A boolean value must be provided."];
703+
}
704+
705+
[self.commandDelegate sendPluginResult:result callbackId:[command callbackId]];
706+
}
707+
659708
/**
660709
* Wrapper method for applying all provided options.
661710
*

src/ios/Instabug.framework/Headers/Instabug.h

Lines changed: 11 additions & 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.1
8+
Version: 7.11.2
99
*/
1010

1111
#import <Foundation/Foundation.h>
@@ -1227,6 +1227,16 @@ OBJC_EXTERN void IBGNSLogWithLevel(NSString *format, va_list args, IBGLogLevel l
12271227
*/
12281228
+ (BOOL)hasRespondedToSurveyWithToken:(NSString *)surveyToken;
12291229

1230+
/**
1231+
@brief Sets a threshold for numbers of sessions and another for number of days required before a survey, that has been dismissed once, would show again.
1232+
1233+
@discussion When a survey that has been shown to the user gets dismissed once, it will not reappear to the user unless a certain number of sessions have started AND a certain number of days have passed since the user first dismissed the survey. Note that if a survey is dismissed for a second time, it will not show again, in other words, it will be set to `canceled`. This applies to both surveys with and without tokens.
1234+
1235+
@param sessionCount : Number of sessions required to be initialized before a dismissed survey can be shown again.
1236+
@param daysCount : Number of days required to pass before a dismissed survey can be shown again.
1237+
*/
1238+
+ (void)setThresholdForReshowingSurveyAfterDismiss:(NSInteger)sessionCount daysCount:(NSInteger)daysCount;
1239+
12301240
/// ------------------------
12311241
/// @name SDK Debugging
12321242
/// ------------------------

src/ios/Instabug.framework/Info.plist

0 Bytes
Binary file not shown.

src/ios/Instabug.framework/Instabug

2.69 MB
Binary file not shown.

src/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-
FXGwngWRcYOFi0T4tL2KdxlGUjw=
9+
cPStZRHftpl8keEtrsFPAjs84QM=
1010
</data>
1111
<key>Info.plist</key>
1212
<data>
13-
j7YBrXxPdubzZ6bNCoQpUGSt9Ps=
13+
1eXWHXKrrtqRe4qY2lZPamKmzio=
1414
</data>
1515
<key>Modules/module.modulemap</key>
1616
<data>
@@ -23,11 +23,11 @@
2323
<dict>
2424
<key>hash</key>
2525
<data>
26-
FXGwngWRcYOFi0T4tL2KdxlGUjw=
26+
cPStZRHftpl8keEtrsFPAjs84QM=
2727
</data>
2828
<key>hash2</key>
2929
<data>
30-
q5gMkf8yDUe0ic4LGgKu6eHW6DceEAnkLcLrx6H5/TA=
30+
obPoSnbr/IMM9YSKOfz8g6c75Hc6ydOs9ruaSkspFxA=
3131
</data>
3232
</dict>
3333
<key>Modules/module.modulemap</key>

src/ios/InstabugCore.framework/Headers/IBGTypes.h

Lines changed: 5 additions & 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.1
8+
Version: 7.11.2
99
*/
1010

1111
#import <UIKit/UIKit.h>
@@ -78,6 +78,10 @@ extern NSString * const kIBGSurveyThankYouTitleText;
7878
extern NSString * const kIBGSurveyThankYouDescriptionText;
7979
extern NSString * const kIBGSurveysNPSLeastLikelyStringName;
8080
extern NSString * const kIBGSurveysNPSMostLikelyStringName;
81+
extern NSString * const kIBGSurveyNextButtonTitle;
82+
extern NSString * const kIBGSurveySubmitButtonTitle;
83+
extern NSString * const kIBGSurveyAppStoreThankYouTitle;
84+
extern NSString * const kIBGSurveyAppStoreButtonTitle;
8185
extern NSString * const kIBGExpectedResultsStringName;
8286
extern NSString * const kIBGActualResultsStringName;
8387
extern NSString * const kIBGStepsToReproduceStringName;

src/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.1
8+
Version: 7.11.2
99
*/
1010

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

0 commit comments

Comments
 (0)