Skip to content

Commit d03db39

Browse files
committed
✨ Add setThresholdForReshowingSurveyAfterDismiss API for iOS
1 parent f123aff commit d03db39

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,18 @@ module.exports = {
901901
Instabug.setVideoRecordingFloatingButtonPosition(position);
902902
},
903903

904+
/**
905+
* Sets a threshold for numbers of sessions and another for number of days
906+
* required before a survey, that has been dismissed once, would show again.
907+
* @param {number} sessionCount Number of sessions required to be
908+
* initialized before a dismissed survey can be shown again.
909+
* @param {number} daysCount Number of days required to pass before a
910+
* dismissed survey can be shown again.
911+
*/
912+
setThresholdForReshowingSurveyAfterDismiss: function (sessionCount, daysCount) {
913+
Instabug.setThresholdForReshowingSurveyAfterDismiss(sessionCount, daysCount);
914+
},
915+
904916
/**
905917
* The event used to invoke the feedback form
906918
* @readonly

ios/RNInstabug/InstabugReactBridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#import <Foundation/Foundation.h>
1010
#import <React/RCTBridgeModule.h>
11-
#import "RCTEventEmitter.h"
11+
#import <React/RCTEventEmitter.h>
1212

1313
@interface InstabugReactBridge : RCTEventEmitter <RCTBridgeModule>
1414

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,10 @@ - (dispatch_queue_t)methodQueue {
369369
[Instabug setVideoRecordingFloatingButtonPosition:position];
370370
}
371371

372+
RCT_EXPORT_METHOD(setThresholdForReshowingSurveyAfterDismiss:(NSInteger)sessionCount daysCount:(NSInteger)daysCount) {
373+
[Instabug setThresholdForReshowingSurveyAfterDismiss:sessionCount daysCount:daysCount];
374+
}
375+
372376
RCT_EXPORT_METHOD(isRunningLive:(RCTResponseSenderBlock)callback) {
373377
BOOL result = NO;
374378
#if TARGET_OS_SIMULATOR

ios/RNInstabug/RCTConvert+InstabugEnums.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2016 Facebook. All rights reserved.
77
//
88

9-
#import "RCTConvert.h"
9+
#import <React/RCTConvert.h>
1010

1111
@interface RCTConvert (InstabugEnums)
1212

0 commit comments

Comments
 (0)