Community-maintained Agent Skills for complete Swift and Apple-platform app delivery.
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Medium
Suggest reviewing before use
iOS 27 / macOS 27 / visionOS 27 / watchOS 27 additions to Foundation Models. Everything here needs the 27.0 SDK (Xcode 27) and an availability check when the deployment target is iOS 26. The iOS 26 surface in foundation-models.md still applies.
| Area | iOS 26 | iOS 27 |
|---|---|---|
| Model | SystemLanguageModel only | Any LanguageModel: system, Private Cloud Compute, Core AI, custom/server |
| Input | Text | Text plus images through Attachment |
| Session config | Fixed at init | LanguageModelSession.DynamicProfile switches model, tools, instructions, temperature, reasoning level |
| Transcript | Prompts, responses, tool calls | Adds reasoning entries (Transcript.Entry.reasoning(_:)) |
| Measurement | Manual | Foundation Models instrument in Instruments, Evaluations framework |
LanguageModel (iOS 27.0+) is the seam between a model and LanguageModelSession. Same session API, different model:
let session = LanguageModelSession(model: MyCustomServerLanguageModel())
let response = try await session.respond(to: "Tell me a joke!")Requirements: capabilities, executorConfiguration, an Executor, supportsDataAttachmentType(_:), supportsDataEntryType(_:). The executor does the work: it receives a LanguageModelExecutorGenerationRequest (transcript, tools, schema, options) and streams events back through a LanguageModelExecutorGenerationChannel. Keep the conforming type lightweight.
Built-in conformers: SystemLanguageModel, PrivateCloudComputeLanguageModel. Check model.capabilities (LanguageModelCapabilities: guided generation, reasoning, tool calling, vision) before using a feature. Ship custom providers as Swift packages.
Larger server-side model with the same session API.
let model = PrivateCloudComputeLanguageModel()
guard model.isAvailable else {
// inspect model.availability (PrivateCloudComputeLanguageModel.Availability)
return
}
let session = LanguageModelSession(model: model)
let response = try await session.respond(to: "Summarize this note.")com.apple.developer.private-cloud-compute. Request it through Apple's Private Cloud Compute developer page; eligibility requirements apply.availability (device not eligible, system not ready) before use.quotaUsage (PrivateCloudComputeLanguageModel.QuotaUsage: limits, status, reset date) and surface quota state in UI.PrivateCloudComputeLanguageModel.Error: quota reached, network failure, service unavailable. Keep an on-device or non-AI fallback.contextSize, supportedLanguages, supportsLocale(_:).Wrap images in Attachment inside the prompt. Accepted sources: CGImage, CIImage, CVPixelBuffer (camera, video frames), image URL (type inferred from the URL, so it must point at a real image file).
orientation for images with no rotation applied, such as AVFoundation frames..label(_:) on an attachment lets tools refer to that image.@Generable enum and greedy sampling to get one of your predefined labels.OCRTool (text extraction) and BarcodeReaderTool.ImageReference argument; resolve it against the session transcript inside call(arguments:).capabilities for vision support on the chosen model first.LanguageModelSession.DynamicProfile lets one session change configuration as app state changes. body must resolve to a single Profile; a Profile binds instructions and tools to model settings.
Modifiers:
model(_:), temperature(_:), samplingMode(_:), reasoningLevel(_:), maximumResponseTokens(_:), toolCallingMode(_:)historyTransform(_:) changes what the model sees without changing the stored transcriptonActivate, onDeactivate, onPrompt, onReasoning, onResponse, onToolCall, onToolOutputtranscriptErrorHandlingPolicy(_:)Profile {
// instructions and tools for the task
}
.historyTransform { history in
Array(history.suffix(20))
}Use a profile to move from a cheap on-device model to a server model for hard tasks, or to expose editing tools only while the user is editing. Prefer one session with profiles over rebuilding sessions and losing the transcript.
CoreAILanguageModel (from the coreai-models package, CoreAILM product) runs an exported open-weights model through the same session API. Requires iOS 27 / macOS 27 and Xcode 27.
import FoundationModels
import CoreAILanguageModels
guard let modelURL = Bundle.main.url(forResource: "YourModelFolder", withExtension: nil) else { return }
let model = try await CoreAILanguageModel(resourcesAt: modelURL)
let session = LanguageModelSession(model: model)
let response = try await session.respond(to: "Summarize the key points: ...")Steps: export with uv run coreai.llm.export HF_ID (add --platform iOS for iOS), bundle the output folder (.aimodel plus tokenizer), add the coreai-models package. Loading is async; start before the user needs it. Reasoning models add Transcript.Entry.reasoning(_:), which stays out of the user-facing response. For raw model execution without a session, see core-ai.md.
#available(iOS 27, *) on an iOS 26 deployment target.PrivateCloudComputeLanguageModel without the managed entitlement or without handling quota and network errors.capabilities lack vision..tessl-plugin
skills
accessorysetupkit
references
activitykit
adattributionkit
references
alarmkit
references
app-clips
app-intents
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
audioaccessorykit
references
authentication
references
avfoundation-audio
references
avkit
background-processing
references
browserenginekit
callkit
references
carplay
cloudkit
contacts-framework
references
core-bluetooth
references
core-data
core-haptics
references
core-motion
references
core-nfc
references
coreml
references
cryptokit
cryptotokenkit
debugging-instruments
device-integrity
references
energykit
references
eventkit
family-controls
references
financekit
focus-engine
gamekit
git-branching-workflow
references
healthkit
references
homekit
references
ios-accessibility
ios-app-workflow
references
ios-ettrace-performance
ios-localization
ios-memgraph-analysis
ios-networking
ios-simulator
references
metrickit
references
musickit
references
natural-language
paperkit
references
passkit
references
pdfkit
pencilkit
references
permissionkit
references
photokit
push-notifications
quicklook
references
realitykit
references
relevancekit
references
scenekit
sensorkit
shazamkit
references
speech-recognition
references
spritekit
storekit
swift-api-design-guidelines
swift-architecture
references
swift-charts
swift-codable
references
swift-code-review
swift-concurrency
swift-formatstyle
references
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-responsive-layout
swiftui-uikit-interop
swiftui-webkit
tabletopkit
tipkit
vision-framework
weatherkit
references