OptimizelyCodeBlocksKey Class Reference

Inherits from NSObject
Declared in OptimizelyCodeBlocksKey.h

Overview

This class defines a key that can be used to define an Optimizely code blocks experiment.

The recommended method of creating an OptimizelyCodeBlocksKey is through the OptimizelyCodeBlocksKeyWithBlockNames macro:

OptimizelyCodeBlocksKeyWithBlockNames(myCodeBlocksKey, @“myFirstBlock”, @“mySecondBlock”)

This will define an OptimizelyCodeBlocksKey called myCodeBlocksKey with a blockOne name of @“myFirstBlock” and blockTwo name of @“mySecondBlock”.

You can then implement the code blocks experiment with [Optimizely codeBlocksWithKey: blockOne: blockTwo: … defaultBlock:]

The number of block names should match the number of non-default blocks in your code blocks experiment.

If the number of block names is less than the number of blocks in your experiment, Optimizely will assign a default name to the code block once it is executed.

If the number of block names is fewer than the number of blocks in your experiment, Optimizely will ignore the additional names.

  key

A unique name for this OptimizelyCodeBlocksKey

@property (readonly) NSString *key

Declared In

OptimizelyCodeBlocksKey.h

  blockNames

Array of associated block names for this code blocks experiment

@property (readonly) NSArray *blockNames

Declared In

OptimizelyCodeBlocksKey.h