One Logo Pool Ball
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

TypeScript
static 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

TypeScript
static 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

TypeScript
static 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

TypeScript
static 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

TypeScript
static 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

TypeScript
static 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

TypeScript
static 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 →