# Constants

The following constants are available globally.

### Log Level Options

- `ApptimizeLogLevelVerbose`

  See

  `+[Apptimize setLogLevel:]`

  Log level option to show all possible logging output.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeLogLevelVerbose

  Swift

      let ApptimizeLogLevelVerbose: String

- `ApptimizeLogLevelDebug`

  See

  `+[Apptimize setLogLevel:]`

  Log level option to show additional information to aid with debugging.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeLogLevelDebug

  Swift

      let ApptimizeLogLevelDebug: String

- `ApptimizeLogLevelInfo`

  See

  `+[Apptimize setLogLevel:]`

  Log level option to show information in addition to warnings and errors.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeLogLevelInfo

  Swift

      let ApptimizeLogLevelInfo: String

- `ApptimizeLogLevelWarn`

  See

  `+[Apptimize setLogLevel:]`

  Log level option to show all warnings and errors.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeLogLevelWarn

  Swift

      let ApptimizeLogLevelWarn: String

- `ApptimizeLogLevelError`

  See

  `+[Apptimize setLogLevel:]`

  Log level option to show only errors.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeLogLevelError

  Swift

      let ApptimizeLogLevelError: String

- `ApptimizeLogLevelOff`

  See

  `+[Apptimize setLogLevel:]`

  Log level option to disable logging entirely.

  This is the default option.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeLogLevelOff

  Swift

      let ApptimizeLogLevelOff: String

### Server Region Options

- `ApptimizeServerRegionDefault`

  See

  `ApptimizeServerRegionOption`

  Use Apptimize default servers.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeServerRegionDefault

  Swift

      let ApptimizeServerRegionDefault: String

- `ApptimizeServerRegionEUCS`

  See

  `ApptimizeServerRegionOption`

  Set the apptimize server region to EU.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeServerRegionEUCS

  Swift

      let ApptimizeServerRegionEUCS: String

### Run Test Options

- `ApptimizeUpdateMetadataTimeoutOption`

  Sets the amount of time to wait in milliseconds until metadata is available. If this is set to 0, Apptimize will block until metadata is available. If this option is omitted, Apptimize will not block for metadata.

  See

  `+[Apptimize runTest:withBaseline:variations:andOptions:]`

  See

  `+[Apptimize runTest:withBaseline:apptimizeCodeBlocks:andOptions:]`

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeUpdateMetadataTimeoutOption

  Swift

      let ApptimizeUpdateMetadataTimeoutOption: String

### Info.plist Options

- `ApptimizeDevicePairingOption`

  This option controls whether Apptimize will attempt to pair with the development server.

  `Info.plist`: ApptimizeDevicePairingEnabled (Boolean, default YES)

  Note

  Only available on iOS or tvOS

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeDevicePairingOption

  Swift

      let ApptimizeDevicePairingOption: String

- `ApptimizeLogLevelOption`

  This option controls the amount of logging the Apptimize SDK will output.

  `Info.plist`: ApptimizeLogLevel (String, [verbose, debug, info, warn, error, off], default “error”)

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeLogLevelOption

  Swift

      let ApptimizeLogLevelOption: String

- `ApptimizeDelayUntilTestsAreAvailableOption`

  This option controls how long (in milliseconds) Apptimize will wait for tests and their associated data to download.

  `Info.plist`: ApptimizeDelayUntilTestsAreAvailable (Integer, milliseconds, default 0)

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeDelayUntilTestsAreAvailableOption

  Swift

      let ApptimizeDelayUntilTestsAreAvailableOption: String

- `ApptimizeEnableThirdPartyEventImportingOption`

  This option controls whether Apptimize will automatically import events from third-party analytics frameworks.

  `Info.plist`: ApptimizeEnableThirdPartyEventImporting (Boolean, default YES)

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeEnableThirdPartyEventImportingOption

  Swift

      let ApptimizeEnableThirdPartyEventImportingOption: String

- `ApptimizeEnableThirdPartyEventExportingOption`

  This option controls whether Apptimize will automatically export events to third-party analytics frameworks.

  `Info.plist`: ApptimizeEnableThirdPartyEventExporting (Boolean, default YES)

  Note

  Only available on iOS or tvOS

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeEnableThirdPartyEventExportingOption

  Swift

      let ApptimizeEnableThirdPartyEventExportingOption: String

- `ApptimizeEnableInteractionEventCollectionOption`

  This option governs whether Apptimize will automatically log events for button clicks and table cell activations.

  `Info.plist`: ApptimizeEnableInteractionEventCollection (Boolean, default NO)

  Note

  Only available on iOS or tvOS

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeEnableInteractionEventCollectionOption

  Swift

      let ApptimizeEnableInteractionEventCollectionOption: String

- `ApptimizeEnableVisualSupportOption`

  This option governs whether Apptimize will disable all visual experiments and modifications.

  `Info.plist`: ApptimizeEnableVisualSupport (Boolean, default YES)

  Note

  Only available on iOS or tvOS

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeEnableVisualSupportOption

  Swift

      let ApptimizeEnableVisualSupportOption: String

- `ApptimizeForceVariantsShowWinnersAndInstantUpdatesOption`

  This option governs whether Apptimize will show winning variants and instant updates when forceVariant is used.

  `Info.plist`: ApptimizeForceVariantsShowWinnersAndInstantUpdates (Boolean, default NO)

  #### Declaration

  Objective-C

      extern NSString
          *const _Nonnull ApptimizeForceVariantsShowWinnersAndInstantUpdatesOption

  Swift

      let ApptimizeForceVariantsShowWinnersAndInstantUpdatesOption: String

- `ApptimizeRefreshMetadataOnSetupOption`

  This option governs whether Apptimize will force a refresh on startup, even if metadata is currently saved on device. ApptimizeInitializedNotification will not be dispatched until the metadata has been downloaded. After metadata has downloaded (or failed to download) ApptimizeInitializedNotification will be dispatched. ApptimizeInitializedNotification will dispatch even if there is no cached metadata. Can be combined with ApptimizeDelayUntilTestsAreAvailableOption to block on setup until new metadata has been downloaded.

  `Info.plist`: ApptimizeRefreshMetaDataOnSetup (Boolean, default NO)

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeRefreshMetadataOnSetupOption

  Swift

      let ApptimizeRefreshMetadataOnSetupOption: String

- `ApptimizeServerRegionOption`

  This option controls the Apptimize server region selection.

  `Info.plist`: ApptimizeServerRegion (String, [default, eucs], default: default)

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeServerRegionOption

  Swift

      let ApptimizeServerRegionOption: String

- `ApptimizeAppGroupOption`

  This option controls if Apptimize should share its data with widgets. This option should be set for all targets that needs to have access. For instance, watchOS application can have its own metadata and result reporting or it can use a shared with the main iOS application. For the second case, `ApptimizeAppGroupOption` is mandatory for both iOS and watchOS applications.

  If Apptimize can’t get access to the shared container due to missing entitlments or misconfigured app group, Apptimize will use the defaul local app storage. If the shared group container is available and there is local stored data, the data will be moved into the shared container.

  `Info.plist`: ApptimizeAppGroup (String, default: nil)

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeAppGroupOption

  Swift

      let ApptimizeAppGroupOption: String

### Notifications

- `ApptimizeTestRunNotification`

  Deprecated

  Use ApptimizeParticipatedInExperimentNotification, ApptimizeEnrolledInExperimentNotification and ApptimizeUnenrolledInExperimentNotification instead

  A notification with this name is posted whenever an Apptimize test runs. The notification carries a dictionary which contains the following keys: `ApptimizeTestNameUserInfoKey`, `ApptimizeVariantNameUserInfoKey` and `ApptimizeTestFirstRunUserInfoKey`.

  Usage of this notification is deprecated. Please use the replacement notifications: `ApptimizeParticipatedInExperimentNotification`, `ApptimizeEnrolledInExperimentNotification` and `ApptimizeUnenrolledInExperimentNotification`

  #### Declaration

  Objective-C

      extern DEPRECATED_MSG_ATTRIBUTE(
          "Use ApptimizeParticipatedInExperimentNotification, "
          "ApptimizeEnrolledInExperimentNotification and "
          "ApptimizeUnenrolledInExperimentNotification instead") NSString *const
          ApptimizeTestRunNotification

  Swift

      static let ApptimizeTestRun: NSNotification.Name

- `ApptimizeTestNameUserInfoKey`

  The name of the test that caused this notification in string format.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeTestNameUserInfoKey

  Swift

      let ApptimizeTestNameUserInfoKey: String

- `ApptimizeVariantNameUserInfoKey`

  The name of the variant that caused this notification in string format.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeVariantNameUserInfoKey

  Swift

      let ApptimizeVariantNameUserInfoKey: String

- `ApptimizeTestFirstRunUserInfoKey`

  Whether this is the first time Apptimize has run this variant since enrollment in boolean format.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeTestFirstRunUserInfoKey

  Swift

      let ApptimizeTestFirstRunUserInfoKey: String

- `ApptimizeMetadataStateFlagsKey`

  An NSNumber representing the ApptimizeMetadataStateFlags value for this update. See @ApptimizeMetadataStateFlags for more information.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeMetadataStateFlagsKey

  Swift

      let ApptimizeMetadataStateFlagsKey: String

- `ApptimizeWillRefreshMetadataKey`

  Whether Apptimize considers the metadata stale and will update it now or not. This value is wrapped in an NSNumber.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeWillRefreshMetadataKey

  Swift

      let ApptimizeWillRefreshMetadataKey: String

- `ApptimizeTestsProcessedNotification`

  This notification is posted whenever an Apptimize recalculates its configuration. The enrolled tests may or may not have changed.

  The dynamic variable values may or may not have changed.

  This happens at various times:

  - new information from server
  - device properties or custom attributes changed
  - and a few other cases

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeTestsProcessedNotification

  Swift

      static let ApptimizeTestsProcessed: NSNotification.Name

- `ApptimizeMetadataStateChangedNotification`

  This notification is posted whenever the metadata state changes. The notification carries a dictionary which contains the following key:

  - `ApptimizeMetadataStateFlagsKey`: A combination of one or more values from the ApptimizeMetadataStateFlags enumeration. This value is represented as an NSNumber.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeMetadataStateChangedNotification

  Swift

      static let ApptimizeMetadataStateChanged: NSNotification.Name

- `ApptimizeResumedNotification`

  This notification is posted whenever your app has been returned from the background and apptimize has in turn resumed operation. The notification carries a dictionary which contains the following key:

  - `ApptimizeWillRefreshMetadataKey`: A boolean value indicating if a metadata refresh will happen now. This value is wrapped in an NSNumber.

  If a refresh is happening and you need to know when it has been completed, you can monitor `ApptimizeTestsProcessedNotification` to determine when the `ApptimizeMetadataStateRefreshing` flag is cleared.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeResumedNotification

  Swift

      static let ApptimizeResumed: NSNotification.Name

- `ApptimizeParticipatedInExperimentNotification`

  This notification is posted whenever a user has participated in an experiment. The notification carries a dictionary which contains the following keys: `ApptimizeTestInfoKey`, `ApptimizeFirstParticipationKey`

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeParticipatedInExperimentNotification

  Swift

      static let ApptimizeParticipatedInExperiment: NSNotification.Name

- `ApptimizeEnrolledInExperimentNotification`

  This notification is posted whenever a user becomes enrolled in an experiment. The notification carries a dictionary which contains the following key: `ApptimizeTestInfoKey`

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeEnrolledInExperimentNotification

  Swift

      static let ApptimizeEnrolledInExperiment: NSNotification.Name

- `ApptimizeUnenrolledInExperimentNotification`

  This notification is posted whenever a user becomes unenrolled from an experiment. The notification carries a dictionary which contains the following keys: `ApptimizeTestInfoKey`, and `ApptimizeUnenrollmentReasonKey`.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeUnenrolledInExperimentNotification

  Swift

      static let ApptimizeUnenrolledInExperiment: NSNotification.Name

- `ApptimizeInitializedNotification`

  This notification is posted whenever Apptimize is fully initialized. This notification is posted regardless metadata available or not and indicates that Apptimize is initialized. To check the metadata state please use `[Apptimize metadataState]` method

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeInitializedNotification

  Swift

      static let ApptimizeInitialized: NSNotification.Name

- `ApptimizeTestInfoKey`

  Information about the experiment that caused this notification as an instance of the `ApptimizeTestInfo` class.

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeTestInfoKey

  Swift

      let ApptimizeTestInfoKey: String

- `ApptimizeUnenrollmentReasonKey`

  The reason for the unenrollment that caused the notification as an `NSInteger`

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeUnenrollmentReasonKey

  Swift

      let ApptimizeUnenrollmentReasonKey: String

- `ApptimizeFirstParticipationKey`

  Indicates this is the first time the user has participated in the experiment as a boolean `NSNumber`

  #### Declaration

  Objective-C

      extern NSString *const _Nonnull ApptimizeFirstParticipationKey

  Swift

      let ApptimizeFirstParticipationKey: String

© 2025 Apptimize Inc.. All rights reserved. (Last updated: 2025-10-10)

Generated by jazzy ♪♫ v0.14.3, a Realm project.