Contents

AppEnumDefinition

An app enumeration definition for testing and dynamic enumeration creation.

Declaration

struct AppEnumDefinition

Mentioned in

Overview

To create an app enum for testing, load the enum definition using IntentDefinitions and its enums property. Then, set its value as shown in the following example:

let definitions = IntentDefinitions(
    bundleIdentifier: "com.apple.example"
)
let colorEnum = definitions.enums["Color"]
let redCase = colorEnum.makeCase("red") // Matches `Color.red`.

Topics

Creating an enumeration case

Identifying the enum

Default Implementations

See Also

Accessing app enums