Inherits from NSObject
Conforms to KiiVariationSampler
Declared in KiiVariationSamplerByKiiUser.h

Overview

Sampler using KiiUser attributes. This uses current login KiiUser ID to randomise the variation.

Instance Methods

chooseVariation:withError:

Do sampling. Returns random variation based on the percentage configured in portal. If the experiment has terminated and fixed variation has chosen, returns chosen variation. (Returned variation is same as <KiiExperiment#chosenVariation>) If you want to customize the logic of Sampler, implement and pass it to <KiiExperiment#getAppliedVariation:>. If the experiment is in draft an error (code 902) will be returned. If the experiment has paused an error (code 903) will be returned. If the experiment has been terminated without specified variant an error (code 904) will be returned. Application has to decide the behavior when this error returned. (ex. apply default UI, etc.)

- (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

Do sampling. Returns random variation based on the percentage configured in portal. If the experiment has terminated and fixed variation has chosen, returns chosen variation. (Returned variation is same as <KiiExperiment#chosenVariation>) If you want to customize the logic of Sampler, implement and pass it to <KiiExperiment#getAppliedVariation:>. If the experiment is in draft an error (code 902) will be returned. If the experiment has paused an error (code 903) will be returned. If the experiment has been terminated without specified variant an error (code 904) will be returned. Application has to decide the behavior when this error returned. (ex. apply default UI, etc.)

Declared In

KiiVariationSamplerByKiiUser.h