SDK Reference v2.0.0 / SurveyViewController


final class SurveyViewController : UIViewController

Presents a MyDataHelps survey for the participant to complete. This view controller implements the complete user experience for a MyDataHelps survey, including step navigation and sending results to MyDataHelps, and is intended for modal presentation.

See Presenting Surveys for a detailed guide to using SurveyViewController.

SurveyViewController is not intended for subclassing.

enum MyDataHelpsKit.SurveyViewController.SurveyResult : String

Describes how a participant completed interaction with a survey.

See SurveyViewController for usage; note that your app must dismiss the SurveyViewController in all result cases.

let presentation: SurveyPresentation

Information about the survey being presented to the participant.

init(presentation: completion:)
init(presentation: SurveyPresentation, completion: @escaping (SurveyViewController, Result<SurveyResult, MyDataHelpsError>) -> Void)

Initializes a SurveyViewController that presents a given survey to a participant.


Information about the survey being presented to the participant. Construct this using ParticipantSession.surveyPresentation(surveyName:).


Called when the participant has completed interaction with the survey. The completion callback must always dismiss the SurveyViewController.