HomeDocumentationAPI Reference
Getting StartedAPI ReferenceBug ReportingCrash ReportingAPMHelp Center

Survey Event Handlers for iOS

Covered here is how to set up the event handler that fires before and after every survey is shown for your iOS apps.

You can execute code in a handler that gets called before a survey is shown and after it has been dismissed. You can use this for things like pausing and resuming a game, for example.

Before Showing the Survey

Surveys.willShowSurveyHandler = {
    // Change some state
}
IBGSurveys.willShowSurveyHandler = ^{
    // Change some state
};

After the Survey Has Been Dismissed

Surveys.didFinishSurveyHandler = { (state, info, identifier) -> Void in
    // Code here
}
IBGSurveys.didFinishSurveyHandler = ^(IBGSurveyFinishedState state, NSDictionary * _Nonnull info, NSString * _Nonnull identifier) {
    // Code here
};

What’s Next

Do more with event handlers, like adding user attributes and events as well as additional logs.