App Schemas let developers map their app's entities and actions to predefined Siri-understandable structures, grouped into App Schema Domains (e.g. messages, photos, mail), so Siri can find content, answer questions, and execute actions in natural language without any custom NLU code.
⢠Siri can now access real app content semantically ā users can ask "Show my last message from Glow" and get an answer without opening the app, powered by IndexedEntity conformance
⢠Conforming an action to an App Schema (e.g. sendMessage) gives Siri full understanding of parameters, validation, and execution flow ā developers write zero natural language handling
⢠App Schema Domains package a coherent set of schemas (mail, messages, photos, etc.) so adopting one domain instantly unlocks an entire class of Siri interactions
Demonstrates conforming a messaging action to the sendMessage App Schema so Siri can send messages on behalf of the user entirely through natural language, with no UI required.
import AppIntents
import Foundation
// MARK: - Contact Entity
struct UnicornContact: AppEntity {
static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "Unicorn Contact")
static let defaultQuery = UnicornContactQuery()
let id: String
let name: String
var displayRepresentation: DisplayRepresentation {
DisplayRepresentation(title: "\(name)")
}
}
struct UnicornContactQuery: EntityStringQuery {
func entities(for identifiers: [String]) async throws -> [UnicornContact] {
// Return contacts matching the given IDs from your data store
identifiers.map { UnicornContact(id: $0, name: $0) }
}
func entities(matching string: String) async throws -> [UnicornContact] {
let all = [UnicornContact(id: "glow", name: "Glow"),
UnicornContact(id: "bubbles", name: "Bubbles"),
UnicornContact(id: "flare", name: "Flare")]
return all.filter { $0.name.localizedCaseInsensitiveContains(string) }
}
}
// MARK: - Message Entity
struct UnicornMessage: AppEntity {
static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "Message")
static let defaultQuery = UnicornMessageQuery()
let id: String
let body: String
let recipientID: String
var displayRepresentation: DisplayRepresentation {
DisplayRepresentation(title: "\(body)")
}
}
struct UnicornMessageQuery: EntityStringQuery {
func entities(for identifiers: [String]) async throws -> [UnicornMessage] {
identifiers.map { UnicornMessage(id: $0, body: "", recipientID: "") }
}
func entities(matching string: String) async throws -> [UnicornMessage] { [] }
}
// MARK: - Send Message Intent (App Schema: messages domain)
struct SendUnicornMessageIntent: AppIntent {
static let title: LocalizedStringResource = "Send Unicorn Message"
static let description = IntentDescription("Send a message to a unicorn contact via UnicornChat.")
// Schema-defined parameters Siri knows how to resolve
@Parameter(title: "Recipient")
var recipient: UnicornContact
@Parameter(title: "Message")
var messageBody: String
func perform() async throws -> some ReturnsValue<UnicornMessage> {
// Invoke your app's actual send logic here
let sentMessage = UnicornMessage(
id: UUID().uuidString,
body: messageBody,
recipientID: recipient.id
)
// e.g. UnicornChatStore.shared.send(sentMessage)
return .result(value: sentMessage)
}
}Foundation Models is a new Apple framework introduced in iOS 27 that gives developers on-device access to the same Apple Intelligence language model powering system features, enabling text generation, structured output, and tool-calling entirely on-device without a network connection.
iOS 27 opens the Foundation Models framework to third-party LLM providers via a new public LanguageModel protocol, enabling anyone to integrate custom, server-based, or open-source models using the same Swift API as Apple's on-device system model.
App Schemas let developers describe their app's content and actions using pre-defined domain schemas (like the Calendar domain) so Siri can understand, search, and act on app data without custom NLP. Entities conforming to IndexedEntity are donated to Spotlight's semantic index, enabling natural-language queries over app content.
In-depth guide
iOS 27 On-Device AI & Apple Intelligence ā⢠App schemas are predefined by Apple ā you can only conform to schemas that exist in a domain, not create arbitrary ones ⢠IndexedEntity conformance triggers background indexing; very large or server-side datasets should use EntityStringQuery instead ⢠The action must return the result as an AppEntity for Siri to present it coherently in context ⢠Beta API surface may shift before final release
Apple Intelligence required; not available on all devices or in all regions
Visual Intelligence brings iOS 17's Visual Look Up capabilities to a new developer-facing API surface in iOS 27, letting apps pipe live camera frames or static images through on-device scene understanding to extract subjects, text, barcodes, and rich semantic labels without any cloud round-trip.