-
Crea experiencias inteligentes con Siri mediante App Schemas
Lleva el contenido y las acciones de tu app a Siri con App Intents. Modela tus datos utilizando App Entities, implementa App Schemas para habilitar potentes acciones del sistema y ofrece interacciones en lenguaje natural impulsadas por Apple Intelligence. Descubre cómo habilitar la búsqueda semántica, realizar acciones en diferentes apps y crear experiencias contextuales mediante el reconocimiento de la pantalla y la transferencia de contenido. Descubre las mejores prácticas y las herramientas de prueba para crear experiencias con Siri rápidas y confiables.
Capítulos
- 0:00 - Introducción
- 1:06 - Novedades en Siri
- 4:06 - Contribuir contenido con App Entities
- 6:21 - Resolución de entidades e IndexedEntity
- 9:49 - Disponibilidad de las acciones
- 12:03 - Adopción de un dominio de esquema en UnicornChat
- 15:39 - Cómo mover contenido entre apps
- 16:00 - Trabajo entre apps: reconocimiento de pantalla
- 21:09 - Mejores prácticas
- 24:18 - Prueba de la integración
- 26:21 - Próximos pasos
Recursos
- Integrating your messaging app with Apple Intelligence
- Donating your app’s data and actions to the system
- Making app entities available in Spotlight
- Making actions and content discoverable by Apple Intelligence
- Providing contextual cues to Apple Intelligence and Siri
- Apple Intelligence and Siri AI
- Messages
- App schema domains
Videos relacionados
WWDC26
-
Buscar este video…
-
-
7:59 - Contributing message content to Apple Intelligence
// Contributing message content to Apple Intelligence @AppEntity(schema: .messages.message) struct MessageEntity: IndexedEntity { // The text content of the message @Property(indexingKey: \.textContent) var body: AttributedString? } -
8:36 - An interface that locates entities using arbitrary string input
// An interface that locates entities using arbitrary string input struct ContactQuery: EntityStringQuery { func entities(matching string: String) async throws -> [ContactEntity] { let predicate = #Predicate<Person> { person in person.name.localizedStandardContains(string) } let descriptor = FetchDescriptor<Person>(predicate: predicate) let matches = try modelContext.fetch(descriptor) return matches.map(\.entity) } } -
17:19 - Working across apps - View annotations
// Working across apps - View annotations List { ForEach(messages) { message in MessageRow(message: message) .appEntityIdentifier( EntityIdentifier( for: MessageEntity.self, identifier: message.id ) ) } } -
18:18 - Working across apps - Exporting content to another app
// Working across apps - Exporting content to another app extension ContactEntity: Transferable { static var transferRepresentation: some TransferRepresentation { IntentValueRepresentation( exporting: \.person ) } } -
19:21 - Working across apps - IntentValueQuery
// Working across apps - IntentValueQuery struct ContactEntityQuery: IntentValueQuery { func values(for input: [IntentPerson]) async throws -> [ContactEntity] { let names = input.map(\.displayName) let descriptor = FetchDescriptor<Contact>() let contacts = try model.mainContext.fetch(descriptor) let matches = contacts.filter { contact in names.contains(where: { name in contact.name.localizedStandardContains(name) }) } return matches.map(\.entity) } } -
20:00 - Working across apps - IntentValueRepresentation
// Working across apps - IntentValueRepresentation extension ContactEntity: Transferable { static var transferRepresentation: some TransferRepresentation { IntentValueRepresentation(exporting: \.person, importing: { intentPerson in let contact = Contact(importing: intentPerson) ContactManager.shared.contacts.append(contact) return contact.entity }) } }
-