Inherits from NSObject
Declared in SFVariation.h

Overview

Splitforce iOS Variation class. Provides variation data and interface
to report on goals caused by this variation.

Tasks

Getting the Variation Data

  •   variationData

    The variationData property contains a dictionary of configuration information
    which are to be used to configure the application.

    property

Experiment Name

Variation Name

  •   name

    Get the name of the variation that was set on Splitforce.com.

    property

Recording Goals

  • – goalResultNamed:

    When a discrete named goal has been met, call this method on the SFVariation object
    to record that goal in the backend.

  • – timedResultNamed:

    To track the length of time since the variation was applied, use the timedResultNamed:
    method. This automatically tracks the length of time (in seconds) since the variation
    was applied.

  • – timedResultNamed:withTime:

    To track arbitrary lengths of time, use the timedResultNamed:withTime: method.
    Your code is repsonsible for making sure the time interval is meaningful for tracking.

  • – quantifiedResultNamed:quantity:

    To track a quantified goal use the quantifiedResultNamed:quantity: method. This is useful
    for integer quantities that happen as a result of a particular variation.

  • – variationEnded

    When no more variation goals are required, call variationEnded. This will cause the variation
    to dissociate itself from its bound object and in most cases will cause the Variation to be
    dealloced. If you retain the variation and continue to send goals, the behaviour is undefined.
    In later releases this will likely lead to an Exception being raised.

Properties

experimentName

Get the name of the experiment that created this variation.

@property (nonatomic, strong, readonly) NSString *experimentName

Declared In

SFVariation.h

name

Get the name of the variation that was set on Splitforce.com.

@property (nonatomic, strong, readonly) NSString *name

Declared In

SFVariation.h

variationData

The variationData property contains a dictionary of configuration information
which are to be used to configure the application.

@property (nonatomic, strong, readonly) NSDictionary *variationData

Declared In

SFVariation.h

Instance Methods

goalResultNamed:

When a discrete named goal has been met, call this method on the SFVariation object
to record that goal in the backend.

- (void)goalResultNamed:(NSString *)name

Parameters

name

The name of the goal to track in the Splitforce results browser.

Declared In

SFVariation.h

quantifiedResultNamed:quantity:

To track a quantified goal use the quantifiedResultNamed:quantity: method. This is useful
for integer quantities that happen as a result of a particular variation.

- (void)quantifiedResultNamed:(NSString *)name quantity:(NSInteger)quantity

Parameters

name

The name of the goal to track in the Splitforce results browser.

quantity

The number to set for this goal in the Splitforce results browser.

Declared In

SFVariation.h

timedResultNamed:

To track the length of time since the variation was applied, use the timedResultNamed:
method. This automatically tracks the length of time (in seconds) since the variation
was applied.

- (void)timedResultNamed:(NSString *)name

Parameters

name

The name of the goal to track in the Splitforce results browser.

Declared In

SFVariation.h

timedResultNamed:withTime:

To track arbitrary lengths of time, use the timedResultNamed:withTime: method.
Your code is repsonsible for making sure the time interval is meaningful for tracking.

- (void)timedResultNamed:(NSString *)name withTime:(NSTimeInterval)time

Parameters

name

The name of the goal to track in the Splitforce results browser.

time

The time value to set for this goal in the Splitforce results browser.

Declared In

SFVariation.h

variationEnded

When no more variation goals are required, call variationEnded. This will cause the variation
to dissociate itself from its bound object and in most cases will cause the Variation to be
dealloced. If you retain the variation and continue to send goals, the behaviour is undefined.
In later releases this will likely lead to an Exception being raised.

- (void)variationEnded

Declared In

SFVariation.h