Add setThresholdForReshowingSurveyAfterDismiss API for iOS

This commit is contained in:
Salma ElTarzi 2018-03-18 09:57:27 +02:00
parent f123affa5c
commit d03db394c0
4 changed files with 18 additions and 2 deletions

View File

@ -901,6 +901,18 @@ module.exports = {
Instabug.setVideoRecordingFloatingButtonPosition(position);
},
/**
* 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.
* @param {number} sessionCount Number of sessions required to be
* initialized before a dismissed survey can be shown again.
* @param {number} daysCount Number of days required to pass before a
* dismissed survey can be shown again.
*/
setThresholdForReshowingSurveyAfterDismiss: function (sessionCount, daysCount) {
Instabug.setThresholdForReshowingSurveyAfterDismiss(sessionCount, daysCount);
},
/**
* The event used to invoke the feedback form
* @readonly

View File

@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import "RCTEventEmitter.h"
#import <React/RCTEventEmitter.h>
@interface InstabugReactBridge : RCTEventEmitter <RCTBridgeModule>

View File

@ -369,6 +369,10 @@ RCT_EXPORT_METHOD(setVideoRecordingFloatingButtonPosition:(IBGPosition)position)
[Instabug setVideoRecordingFloatingButtonPosition:position];
}
RCT_EXPORT_METHOD(setThresholdForReshowingSurveyAfterDismiss:(NSInteger)sessionCount daysCount:(NSInteger)daysCount) {
[Instabug setThresholdForReshowingSurveyAfterDismiss:sessionCount daysCount:daysCount];
}
RCT_EXPORT_METHOD(isRunningLive:(RCTResponseSenderBlock)callback) {
BOOL result = NO;
#if TARGET_OS_SIMULATOR

View File

@ -6,7 +6,7 @@
// Copyright © 2016 Facebook. All rights reserved.
//
#import "RCTConvert.h"
#import <React/RCTConvert.h>
@interface RCTConvert (InstabugEnums)