FoundationModels · IOS API REFERENCE
InstructionsBuilder
struct · iOS 26.0+ · SDK 27.1
@resultBuilder struct InstructionsBuilder
A type that represents an instructions builder.
Members (7)
static · iOS 26.0+buildArray
TypeScriptstatic buildArray(instructions: Array<SDKHandle>): Instructions
Swift declaration@export(implementation) static func buildArray(_ instructions: [some InstructionsRepresentable]) -> Instructions
Creates a builder with an array of instructions.
static · iOS 26.0+buildEither
TypeScriptstatic buildEitherFirst(component: SDKHandle): Instructions
Swift declaration@export(implementation) static func buildEither(first component: some InstructionsRepresentable) -> Instructions
Creates a builder with the first component.
static · iOS 26.0+buildEither
TypeScriptstatic buildEitherSecond(component: SDKHandle): Instructions
Swift declaration@export(implementation) static func buildEither(second component: some InstructionsRepresentable) -> Instructions
Creates a builder with the second component.
static · iOS 26.0+buildOptional
TypeScriptstatic buildOptional(instructions?: (Instructions) | null): Instructions
Swift declaration@export(implementation) static func buildOptional(_ instructions: Instructions?) -> Instructions
Creates a builder with an optional component.
static · iOS 26.0+buildExpression
TypeScriptstatic buildExpression(expression: Instructions): Instructions
Swift declaration@export(implementation) static func buildExpression(_ expression: Instructions) -> Instructions
Creates a builder with an instructions expression.
static · iOS 26.0+buildExpression
TypeScriptstatic buildExpression39964(expression: number): number
Swift declaration@export(implementation) static func buildExpression<I>(_ expression: I) -> I where I : InstructionsRepresentable
Creates a builder with an expression.
static · iOS 26.0+buildLimitedAvailability
TypeScriptstatic buildLimitedAvailability(instructions: SDKHandle): Instructions
Swift declaration@export(implementation) static func buildLimitedAvailability(_ instructions: some InstructionsRepresentable) -> Instructions
Creates a builder with limited availability instructions.
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
InstructionsBuilder.buildBlock(_:)
Swift parameter packs cannot cross the bridge.
All FoundationModels types →