ApptimizeTestInfo

@protocol ApptimizeTestInfo <NSObject>

Information about a single A/B test this device is enrolled in.

  • Declaration

    Objective-C

    - (nonnull NSString *)testName;

    Swift

    func testName() -> String

    Return Value

    The name of the Apptimize A/B test.

  • Declaration

    Objective-C

    - (nonnull NSString *)enrolledVariantName;

    Swift

    func enrolledVariantName() -> String

    Return Value

    The name of the variant of the test that this device is enrolled in.

  • Declaration

    Objective-C

    - (nonnull NSNumber *)testID;

    Swift

    func testID() -> NSNumber

    Return Value

    The unique numeric ID of the Apptimize A/B test.

  • Declaration

    Objective-C

    - (nonnull NSNumber *)enrolledVariantID;

    Swift

    func enrolledVariantID() -> NSNumber

    Return 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() -> Date

    Return 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() -> Date

    Return Value

    The date this device was enrolled into this A/B test.

  • Returns whether the user has participated in this test 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() -> Bool

    Return Value

    Returns YES if the user has participated in this test, or NO if they have not.