AppEnumDefinition
An app enumeration definition for testing and dynamic enumeration creation.
Declaration
struct AppEnumDefinitionMentioned 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`.