ApptimizeTestInfo
@protocol ApptimizeTestInfo <NSObject>
Information about a single A/B test or feature flag this device is enrolled in.
-
Declaration
Objective-C
- (nonnull NSString *)testName;Swift
func testName() -> StringReturn Value
The name of the test.
-
Declaration
Objective-C
- (nonnull NSString *)enrolledVariantName;Swift
func enrolledVariantName() -> StringReturn Value
The name of the variant of the test that this device is enrolled in.
-
Declaration
Objective-C
- (nonnull NSNumber *)testID;Swift
func testID() -> NSNumberReturn Value
The unique numeric ID of the test.
-
Declaration
Objective-C
- (nonnull NSNumber *)enrolledVariantID;Swift
func enrolledVariantID() -> NSNumberReturn Value
The unique numeric ID of the currently enrolled test variant.
-
Note: this is the time as reported by Apptimize’s servers and is not affected by changes in the device’s clock.
Declaration
Objective-C
- (nonnull NSDate *)testStartedDate;Swift
func testStartedDate() -> DateReturn Value
The date this Apptimize test was started.
-
Note: unlike the return value for
testStartedDate, this is the time as reported by the device, and not the time as reported by Apptimize’s server. This difference is relevant if the device’s clock is inaccurate.Declaration
Objective-C
- (nonnull NSDate *)testEnrolledDate;Swift
func testEnrolledDate() -> DateReturn Value
The date this device was enrolled into this test.
-
Declaration
Objective-C
- (nonnull NSNumber *)cycle;Swift
func cycle() -> NSNumberReturn Value
The cycle ID of this test. This is 1 if it’s the initial test run, and increments by 1 each time the test is restarted or for if a non-proportional allocation change is made.
-
Declaration
Objective-C
- (nonnull NSNumber *)currentPhase;Swift
func currentPhase() -> NSNumberReturn Value
The current phase of this test. This is 1 if the test has not been modified since creation, and increments by 1 each time the test is modified (such as when the test’s allocations have been changed). The phase ID does not reset when a test is restarted.
-
Declaration
Objective-C
- (nonnull NSNumber *)participationPhase;Swift
func participationPhase() -> NSNumberReturn Value
The first phase in which this device participated in this test for this cycle. If this test has not been participated in during this cycle, this value will be 0.
-
Returns whether the user has participated in this test in this cycle since enrollment.
- For code block tests, this indicates that a codeblock has been executed for this test.
- For visual tests, this indicates that at least one changed element has been seen.
For dynamic variable tests, this indicates that the value of a variable has been queried.
Declaration
Objective-C
- (BOOL)userHasParticipated;Swift
func userHasParticipated() -> BoolReturn Value
Returns YES if the user has participated in this test, or NO if they have not.
-
Declaration
Objective-C
- (nullable NSString *)userID;Swift
func userID() -> String?Return Value
The user id of the currently enrolled user. If the user has not been set then the anonymous user id is used.
-
Declaration
Objective-C
- (nonnull NSString *)anonymousUserID;Swift
func anonymousUserID() -> StringReturn Value
The anonymous user id currently assigned to this apptimize instance.
-
Declaration
Objective-C
- (ExperimentType)experimentType;Swift
func experimentType() -> ExperimentTypeReturn Value
The experiment type this test info represents.
ApptimizeTestInfo Protocol Reference