Conforms to NSObject
Declared in KiiVariationSampler.h

Overview

A protocol interface for sampler of variation. Used by <KiiExperiment#appliedVariationWithSampler:andError:> . You can implement customized logic of sampling variation by implementing this protocol;

Tasks

Instance Methods

chooseVariation:withError:

Called when sampling needed. You can decide whether returning an error regarding to experiment state, Application setting, user attributes, etc. Application has to decide the behavior when it returns an error. ex.) Apply default UI, etc. Note:<KiiExperiment#appliedVariationWithSampler:andError:> would not return any error. Class that implementing this protocol is responsible for checking state of experiment.

- (nullable KiiVariation *)chooseVariation:(nonnull KiiExperiment *)experiment withError:(NSError *_Nullable *_Nullable)error

Parameters

experiment

that requires sampling.

error

An NSError object, passed by reference.

Return Value

applied variation for this time.

Discussion

Called when sampling needed. You can decide whether returning an error regarding to experiment state, Application setting, user attributes, etc. Application has to decide the behavior when it returns an error. ex.) Apply default UI, etc. Note:<KiiExperiment#appliedVariationWithSampler:andError:> would not return any error. Class that implementing this protocol is responsible for checking state of experiment.

Declared In

KiiVariationSampler.h