AppExtensionPoint.Definition
A property wrapper that a host app uses to declare the extension points it supports.
Declaration
@resultBuilder struct DefinitionMentioned in
Overview
Apply this property wrapper to variables that define your host app’s custom extension points. In the property that follows the definition, specify the name of your extension point and any additional attributes. The following example defines an extension point that runs app extensions with enhanced security:
extension AppExtensionPoint {
@Definition
static var MySecureFeature : AppExtensionPoint {
Name(“MySecureFeature”)
UserInterface(false)
EnhancedSecurity(true)
}
}To ensure the system discovers your app’s extension points, add a user-defined build setting to your app target in Xcode. Set the build setting name to EX_ENABLE_EXTENSION_POINT_GENERATION and configure it with a value of YES. When this setting is present, the compiler adds an .appext file to your app’s bundle and places your definitions in it.