You can pass a survey token to this API to check if a particular user has responded to the survey before showing it. This method takes a string token as an argument and returns a boolean.
let hasResponded = Surveys.hasRespondedToSurvey(withToken: "TOKEN")
BOOL hasResponded = [IBGSurveys hasRespondedToSurveyWithToken:@"TOKEN"];
Surveys.hasRespondToSurvey("TOKEN");
Surveys.hasRespondToSurvey("TOKEN")
Surveys.hasRespondedToSurvey("SURVEY_TOKEN", function(hasResponded) {
alert("Has Responded: "+hasResponded);
});
final hasResponded = Surveys.hasRespondedToSurvey("SURVEY_TOKEN");
Surveys.hasRespondedToSurveyWithToken(
'SURVEY_TOKEN',
function (hasResponded) {
console.log('Has Responded: ' + hasResponded);
},
function (error) {
console.log('Could not get the value - ' + error);
}
);
//iOS
bool hasResponded = IBGSurveys.HasRespondedToSurveyWithToken("TOKEN");
//Android
bool hasResponded = Surveys.HasRespondToSurvey("TOKEN");