Skip to content

Commit 9d815d0

Browse files
committed
⬆️ Upgrade native Android SDK version to 4.12.1
1 parent 8b35de8 commit 9d815d0

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
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.12.0'
24+
compile 'com.instabug.library:instabug:4.12.1'
2525
compile 'com.android.support:multidex:1.0.0'
2626
}

src/ios/IBGPlugin.m

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ - (void) setThresholdForReshowingSurveyAfterDismiss:(CDVInvokedUrlCommand*)comma
670670
NSInteger sessionsCount = [[command argumentAtIndex:0] integerValue];
671671
NSInteger daysCount = [[command argumentAtIndex:1] integerValue];
672672

673-
if (sessionsCount && daysCount ) {
673+
if (sessionsCount && daysCount) {
674674
[Instabug setThresholdForReshowingSurveyAfterDismiss:sessionsCount daysCount:daysCount];
675675
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
676676
} else {
@@ -681,6 +681,30 @@ - (void) setThresholdForReshowingSurveyAfterDismiss:(CDVInvokedUrlCommand*)comma
681681
[self.commandDelegate sendPluginResult:result callbackId:[command callbackId]];
682682
}
683683

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:autoShowingSurveysEnabled];
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+
684708
/**
685709
* Wrapper method for applying all provided options.
686710
*

www/instabug.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,8 @@ Instabug.setThresholdForReshowingSurveyAfterDismiss = function (sessionsCount, d
228228
exec(success, error, 'IBGPlugin', 'setThresholdForReshowingSurveyAfterDismiss', [sessionsCount, daysCount]);
229229
};
230230

231+
Instabug.setAutoShowingSurveysEnabled = function (autoShowingSurveysEnabled, success, error) {
232+
exec(success, error, 'IBGPlugin', 'setAutoShowingSurveysEnabled', [autoShowingSurveysEnabled]);
233+
};
234+
231235
module.exports = Instabug;

0 commit comments

Comments
 (0)