File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,18 @@ module.exports = {
114114 Instabug . showSurveyWithToken ( surveyToken ) ;
115115 } ,
116116
117+ /**
118+ * Returns true if the survey with a specific token was answered before.
119+ * Will return false if the token does not exist or if the survey was not answered before.
120+ * @param {string } surveyToken - A String with a survey token.
121+ * @param {function } surveyTokenCallback callback with argument as the desired value of the whether
122+ * the survey has been responded to or not.
123+ *
124+ */
125+ hasRespondedToSurveyWithToken : function ( surveyToken , surveyTokenCallback ) {
126+ Instabug . hasRespondedToSurveyWithToken ( surveyToken , surveyTokenCallback ) ;
127+ } ,
128+
117129 /**
118130 * Sets a block of code to be executed just before the SDK's UI is presented.
119131 * This block is executed on the UI thread. Could be used for performing any
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ - (dispatch_queue_t)methodQueue {
6565 [Instabug showSurveyWithToken: surveyToken];
6666}
6767
68+ RCT_EXPORT_METHOD (hasRespondedToSurveyWithToken:(NSString *)surveyToken callback:(RCTResponseSenderBlock)callback) {
69+ callback (@[@([Instabug hasRespondedToSurveyWithToken: surveyToken])]);
70+ }
71+
6872RCT_EXPORT_METHOD (setUserStepsEnabled:(BOOL )isUserStepsEnabled) {
6973 [Instabug setUserStepsEnabled: isUserStepsEnabled];
7074}
You can’t perform that action at this time.
0 commit comments