-
코딩 실습: Siri가 앱을 사용할 수 있도록 설정하기
Siri가 앱을 사용할 수 있도록 설정하는 방법을 보여 주는 Xcode 프로젝트를 자세히 살펴보세요. 앱 스키마를 도입하여 사용자가 캘린더 이벤트에 대해 질문하고 일정 관리와 같은 자연어 작업을 수행할 수 있도록 하는 방법을 알아보세요. Spotlight 시맨틱 인덱스에서 콘텐츠를 사용할 수 있도록 하고 화면 내용 인지를 위한 컨텍스트를 제공하는 모범 사례를 살펴보세요.
챕터
- 0:00 - Introduction
- 1:43 - App Schemas and the plan
- 3:44 - Build the CalendarEntity
- 8:00 - Build the AttendeeEntity
- 10:30 - Build the EventEntity
- 14:34 - Open events with OpenIntent
- 15:30 - Onscreen awareness
- 17:18 - Create events with Siri
- 19:24 - Update events
- 21:30 - Custom snippet views
- 22:30 - Delete events
- 23:35 - Next steps
리소스
- Integrating your calendar app with Apple Intelligence
- Donating your app’s data and actions to the system
- Donations and discovery
- 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
- Calendar
- App schema domains
관련 비디오
WWDC26
-
비디오 검색…
-
-
- 0:00 - Introduction
Justin Kang previews the goal: take an existing app and make it available to Siri. A picnic scenario shows Siri searching events, updating times with confirmation, texting attendees, and answering questions, all through conversation.
- 1:43 - App Schemas and the plan
Apps integrate with Apple Intelligence through App Intents, and App Schemas describe content and actions in terms Siri already understands, no training phrases or NLP. Schemas are organized into domains (here, the calendar domain). Introduces the CometCal sample app and the two goals: understand content, and perform actions.
- 3:44 - Build the CalendarEntity
Create a schematized @AppEntity from the calendar_calendar snippet, set the id to UUID, conform to IndexedEntity, wire a @Dependency and @MainActor query (EnumerableEntityQuery with allEntities()), set a display representation, and donate to Spotlight via indexAppEntities and deleteAppEntities.
- 8:00 - Build the AttendeeEntity
Built from calendar_attendee, but conforming to TransientAppEntity instead of IndexedEntity, attendees are accessed only through their event, so they need no identifier, query, or index. Introduces the IntentPerson type and two schematized @AppEnums (calendar_attendeeStatus, calendar_attendeeType).
- 10:30 - Build the EventEntity
The central IndexedEntity (from calendar_event), where the semantic index shines for title and note-content questions. Composes the CalendarEntity and [AttendeeEntity], handles recurrence (Calendar.RecurrenceRule), union values for location and alarms, and event status/span enums.
- 14:34 - Open events with OpenIntent
A small OpenEventIntent conforming to the system.open schema takes an EventEntity and tells the NavigationManager to navigate to it, so tapping an event in Spotlight or Siri opens straight to its detail view.
- 15:30 - Onscreen awareness
Two view modifiers connect the screen to entities: .appEntityIdentifier on the event list and .userActivity (with an EntityIdentifier) on the detail view, letting Siri resolve "this event" or "that third event" without naming the title.
- 17:18 - Create events with Siri
Build CreateEventIntent from calendar_createEvent: fill in parameter types, add a @MainActor @Dependency, and in perform() resolve the schema parameters (location union value, recurrence) into the data layer and return an EventEntity. Siri handles language, clarification, and confirmation.
- 19:24 - Update events
UpdateEventIntent (calendar_updateEvent) mostly mirrors create, but parameters are optional. The key subtlety: an IntentParameter's valueState distinguishes .set with a value (change it), .set with nil (explicitly clear it), and .unset (not part of the request).
- 21:30 - Custom snippet views
Replace Siri's default result card by adding ShowsSnippetView to the intent's return type and returning a custom SwiftUI EventSnippetView, bringing the app's visual personality (cosmic gradient, star icon) into Siri.
- 22:30 - Delete events
DeleteEventIntent is the simplest, just the event plus an optional span for recurring events, and Siri automatically handles confirmation and disambiguation before deleting.
- 23:35 - Next steps
Download the CometCal sample, browse the App Intents documentation for all schemas and domains, write tests with AppIntentsTesting, and watch "Explore advanced App Intents features for Siri and Apple Intelligence."