FSInviteDelegate Protocol Reference

Conforms to NSObject
Declared in FSInviteDelegate.h

Overview

Delegates registered with the ForeSee SDK may adopt the FSInviteDelegate protocol to receive updates about a survey’s lifecycle.

Custom Surveys

– willShowInviteForMeasure:

Tells the delegate that the ForeSee SDK is about to show an invite.

- (void)willShowInviteForMeasure:(TRMeasure *)measure

Parameters

measure

The measure for the survey that the user is about to be invited to take.

Declared In

FSInviteDelegate.h

– willShowSurveyForMeasure:URL:

Tells the delegate that the ForeSee SDK is about to show a survey. (Deprecated: v4.4.0)

- (BOOL)willShowSurveyForMeasure:(TRMeasure *)measure URL:(NSURL *)url

Parameters

measure

The measure for which a survey is about to be displayed.

url

The URL of the survey.

Return Value

NO to prevent the default survey from appearing, YES otherwise.

Discussion

Implement this method to override the default survey view controller.

By default, the ForeSee SDK presents the survey in a custom UIViewController that has a toolbar at the bottom of the screen (with back/forward buttons), an activity indicator, and a navigation bar at the top. This UIViewController provides additional functionality, too, such as preventing navigation to domains not registered in the domain white list (see the foresee_configuration.json that was included with the SDK). It also closes automatically when the survey has been submitted.

So, the long and short is, be fairly certain you want to use a custom view controller to display the survey!

Implementation of this method is optional. Custom surveys are not required. Return YES to allow the default behavior.

This functionality is deprecated as of ForeSee SDK 4.4.

Declared In

FSInviteDelegate.h

– willShowSurveyForMeasure:

Tells the delegate that the ForeSee SDK is about to show a survey.

- (void)willShowSurveyForMeasure:(TRMeasure *)measure

Parameters

measure

The measure for which a survey is about to be displayed.

Declared In

FSInviteDelegate.h

Survey View Controller

– navigationBarForSurveyViewController

Asks the delegate for a UINavigationBar object to use when displaying the survey. (Deprecated: v4.4.0)

- (UINavigationBar *)navigationBarForSurveyViewController

Return Value

A custom styled UINavigationBar

Discussion

Implementation of this method is optional.

Declared In

FSInviteDelegate.h

Sampling and Eligibility Checks

– willNotShowInviteWithEligibilityFailedForMeasure:

Sent when the customer does not pass the eligibility check for a survey.

- (void)willNotShowInviteWithEligibilityFailedForMeasure:(TRMeasure *)measure

Parameters

measure

The measure associated with this event.

Discussion

A user who is not eligible will not see an invite.

Declared In

FSInviteDelegate.h

– willNotShowInviteWithSamplingFailedForMeasure:

Sent when the customer was not included in the sampling pool check.

- (void)willNotShowInviteWithSamplingFailedForMeasure:(TRMeasure *)measure

Parameters

measure

The measure associated with this event.

Discussion

Not all users who are eligible are invited to take a survey. A sampling rate is configured for your account, which limits the total number of users who will see an invite. This method is called when the user was not in the sampling pool.

Declared In

FSInviteDelegate.h

Other Invite Events

– didShowInviteForMeasure:

Tells the delegate that the ForeSee SDK has shown an invite.

- (void)didShowInviteForMeasure:(TRMeasure *)measure

Parameters

measure

The measure associated with the invite that was displayed.

Discussion

Only called when using the built-in invites (i.e. not for custom invites). It’s assumed that custom invites already know when an invite has been shown.

Declared In

FSInviteDelegate.h

– didAcceptInviteForMeasure:

Tells the delegate that the user has accepted an invite.

- (void)didAcceptInviteForMeasure:(TRMeasure *)measure

Parameters

measure

The measure associated with the invite.

Declared In

FSInviteDelegate.h

– didDeclineInviteForMeasure:

Tells the delegate that the user has declined an invite.

- (void)didDeclineInviteForMeasure:(TRMeasure *)measure

Parameters

measure

The measure associated with the invite.

Declared In

FSInviteDelegate.h

Other Survey Events

– didShowSurveyForMeasure:

Tells the delegate that the ForeSee SDK has presented a survey.

- (void)didShowSurveyForMeasure:(TRMeasure *)measure

Parameters

measure

The measure for the survey that was displayed.

Discussion

Warning: Not sent for custom surveys

Declared In

FSInviteDelegate.h

– didCancelSurveyForMeasure:

Tells the delegate that the user cancelled a survey.

- (void)didCancelSurveyForMeasure:(TRMeasure *)measure

Parameters

measure

The measure for the survey that was dismissed.

Discussion

Warning: Not sent for custom surveys

Declared In

FSInviteDelegate.h

– didCompleteSurveyForMeasure:

Tells the delegate that the user completed a survey.

- (void)didCompleteSurveyForMeasure:(TRMeasure *)measure

Parameters

measure

The measure for the survey that was completed.

Discussion

Warning: Not sent for custom surveys

Declared In

FSInviteDelegate.h

Error Conditions

– didFailForMeasure:withContactFormatError:

Sent when the supplied contact information is not in the correct format.

- (void)didFailForMeasure:(TRMeasure *)measure withContactFormatError:(NSError *)error

Parameters

measure

The measure associated with this failure

error

An error object containing details about the formatting issue.

Discussion

This error prevents successful acceptance of an invite.

Declared In

FSInviteDelegate.h

– didFailForMeasure:withMissingInformationError:

Sent when the invite failed because of missing information.

- (void)didFailForMeasure:(TRMeasure *)measure withMissingInformationError:(NSError *)error

Parameters

measure

The measure associated with this failure

error

An error object containing details about the missing information.

Discussion

This error prevents successful acceptance of an invite.

Declared In

FSInviteDelegate.h

– didFailForMeasure:withNetworkError:

Sent when the invite or survey failed because of a network error.

- (void)didFailForMeasure:(TRMeasure *)measure withNetworkError:(NSError *)error

Parameters

measure

The measure associated with this failure

error

An error object containing details about the network failure.

Discussion

This error prevents successful acceptance or cancellation of an invite or survey.

Declared In

FSInviteDelegate.h