View in English

  • Apple Developer
    • 今すぐ始める

    「今すぐ始める」を詳しく見る

    • 概要
    • 学ぶ
    • Apple Developer Program

    最新情報

    • 最新ニュース
    • Hello Developer
    • プラットフォーム

    プラットフォームを詳しく見る

    • Appleプラットフォーム
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    特集

    • デザイン
    • 配信
    • ゲーム
    • アクセサリ
    • Web
    • Home
    • CarPlay
    • テクノロジー

    テクノロジーを詳しく見る

    • 概要
    • Xcode
    • Swift
    • SwiftUI

    特集

    • アクセシビリティ
    • App Intent
    • Apple Intelligence
    • ゲーム
    • 機械学習とAI
    • セキュリティ
    • Xcode Cloud
    • コミュニティ

    コミュニティを詳しく見る

    • 概要
    • 「Appleに相談」イベント
    • コミュニティによるイベント
    • デベロッパフォーラム
    • オープンソース

    特集

    • WWDC
    • Swift Student Challenge
    • デベロッパストーリー
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Center
    • ドキュメント

    ドキュメントを詳しく見る

    • ドキュメントライブラリ
    • テクノロジー概要
    • サンプルコード
    • ヒューマンインターフェイスガイドライン
    • ビデオ

    リリースノート

    • 注目のアップデート
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • ダウンロード

    ダウンロードを詳しく見る

    • すべてのダウンロード
    • オペレーティングシステム
    • アプリ
    • デザインリソース

    特集

    • Xcode
    • TestFlight
    • フォント
    • SF Symbols
    • Icon Composer
    • サポート

    サポートを詳しく見る

    • 概要
    • ヘルプガイド
    • デベロッパフォーラム
    • フィードバックアシスタント
    • お問い合わせ

    特集

    • アカウントヘルプ
    • App Reviewガイドライン
    • App Store Connectヘルプ
    • 近日導入予定の要件
    • 契約およびガイドライン
    • システムステータス
  • クイックリンク

    • イベント
    • ニュース
    • Forum
    • サンプルコード
    • ビデオ
 

ビデオ

メニューを開く メニューを閉じる
  • コレクション
  • すべてのビデオ
  • 利用方法

その他のビデオ

  • 概要
  • Summary
  • コード
  • SiriおよびApple Intelligence向けの高度なApp Intent機能

    App Intentに関する各種の高度なAPIを使用すると、Siriとのより洗練された連係が可能になります。ユーザーの声だけでさまざまな操作を行えるようにする方法、Apple Intelligenceのサポートでデバイス内のコンテンツを探す方法、Siriがアプリの状態を把握できるようにオンスクリーン認識のためのコンテキストを提供する方法を解説します。

    関連する章

    • 0:00 - Introduction
    • 1:59 - Customize how Siri responds
    • 4:20 - Visual responses
    • 6:22 - Interaction donations
    • 9:46 - Confirmations and entity ownership
    • 11:59 - Semantic index with IndexedEntity
    • 13:32 - Structured search with IntentValueQuery
    • 15:27 - In-app search
    • 16:22 - Onscreen awareness
    • 20:51 - Leverage existing integrations
    • 23:30 - Next steps

    リソース

    • App Intents Testing
    • 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
      • HDビデオ
      • SDビデオ

    関連ビデオ

    WWDC26

    • App SchemaによるインテリジェントなSiri体験の構築
    • Code Along:アプリをSiriに対応させる方法
  • このビデオを検索
    • 2:42 - Custom dialog response

      @AppIntent(schema: .audio.addToPlaylist)
        struct AddToPlaylistIntent {
      
            func perform() async throws -> some IntentResult & ProvidesDialog {
                // Adds song to playlist and responds
                return .result(
                    dialog: IntentDialog(
                        full: """
                              Added \(song.title) to the \
                              \(playlist.title) mix tape.
                              """,
                        supporting: "Added"
                    )
                )
            }
        }
    • 3:42 - Ask a clarifying question within an inten

      @AppIntent(schema: .clock.createTimer)
        struct CreateTimerIntent {
            // MARK: Schema Parameters
            var duration: Duration
            var label: String?
            var isSleepTimer: Bool
      
            func perform() async throws -> some ReturnsValue<TimerEntity> {
                // Checks active timers and requests label parameter
                label = try await $label.requestValue(
                    """
                    You already have a timer running. \
                    What should we call this one?
                    """
                )
                return .result(value: timerEntity)
            }
        }
    • 4:26 - Enhanced DisplayRepresentation

      // Enhanced DisplayRepresentation
        @AppEntity(schema: .audio.song)
        struct SongEntity {
      
            var displayRepresentation: DisplayRepresentation {
                DisplayRepresentation(
                    title: "\(title)",
                    subtitle: "\(artistName)",
                    image: artworkImage
                )
            }
        }
    • 5:05 - Return a custom snippet view

      @AppIntent(schema: .audio.addToPlaylist)
        struct AddToPlaylistIntent {
      
            var audioEntity: AudioEntity
            var playlist: PlaylistEntity
      
            func perform() async throws -> some IntentResult & ProvidesDialog & ShowsSnippetView {
                // Adds to playlist and shows dialog and snippet
                let view = PlaylistSnippetView(
                    playlist: updatedEntity,
                    tracks: updated.tracks
                )
                return .result(dialog: dialog, view: view)
            }
        }
    • 7:44 - Donate a UI interaction

      @ModelActor
        actor ModelManager {
            func sendMessage(_ /* ... */, donateIntent: Bool = false) async throws -> [Message.ID] {
      
                // Donate intent with parameters and result so Siri can learn user preferences
                if donateIntent {
                    let intent = SendMessageIntent()
                    intent.destination = .recipients(conversation.recipients.map(\.entity))
      
                    let result = messages.map(\.entity)
                    Task {
                        try await IntentDonationManager.shared.donate(
                            intent: intent,
                            result: .result(value: result)
                        )
                    }
                }
            }
        }
    • 10:03 - Declare entity ownership for confirmations

      // Informs system if entity is public or shared with others
        @AppEntity(schema: .calendar.event)
        struct EventEntity: OwnershipProvidingEntity {
      
            var ownership: EntityOwnership {
                // isShared used to compute ownership state: .shared, .public, or .unknown
                attendees.isEmpty ? .unknown : .shared
            }
        }
    • 11:30 - Index entities with IndexedEntity

      // Indexing IndexedEntity with CSSearchableIndex
        struct EntityIndexingHelper {
            // Indexes playlist entities
            func indexPlaylist(_ playlist: Playlist) async throws {
                let entity = PlaylistEntity(playlist: playlist)
                try await CSSearchableIndex(name: indexName)
                    .indexAppEntities([entity])
            }
        }
    • 13:38 - Structured search with IntentValueQuer

      // Structured search of songs and playlists
        struct AudioIntentValueQuery: IntentValueQuery {
      
            // AudioSearch, IntentPerson, and other system types may be supported as input
            func values(for input: AudioSearch) async throws -> [AudioEntity] {
                switch input.criteria {
                case .searchQuery(let query):
                    return try await searchResults(for: query)
                case .unspecified:
                    return try await likedSongResults()
                // ... also a .url case
                }
            }
        }
    • 14:49 - Re-run Siri search in your app

      // Intent that re-runs the Siri search in app
        @AppIntent(schema: .system.searchInApp)
        struct SearchAudioLibraryIntent {
      
            var criteria: StringSearchCriteria
      
            func perform() async throws -> some IntentResult {
                // Perform in-app search with Siri search string
                navigation.searchText = criteria.term
                navigation.selectedTab = .library
                return .result()
            }
        }
    • 16:27 - Onscreen awareness annotations

      // (a) Single primary entity on screen — NSUserActivity
        struct NowPlayingView: View {
            @Environment(PlaybackController.self) private var playback
      
            var body: some View {
                VStack {
                    // Player UI
                }
                .userActivity("cosmotunes.nowPlaying", isActive: playback.currentTrack) { activity in
                    activity.title = playback.currentTrack?.title
                    activity.appEntityIdentifier = EntityIdentifier(
                        for: SongEntity.self,
                        identifier: playback.currentTrack.id
                    )
                }
            }
        }
      
        // (b) One entity among many — View Entity annotation
        struct AlbumView: View {
            private var header: some View {
                VStack(alignment: .leading, spacing: 6) {
                    // ...
                }
                .appEntityIdentifier(
                    EntityIdentifier(for: AlbumEntity.self, identifier: session.id.uuidString)
                )
            }
        }
        
        // (c) Lists and collections — Collection annotation
        struct PlaylistDetailView: View {
            var body: some View {
                List {
                    ForEach(playlist.tracks) { track in
                        PlaylistTrackRow(track: track)
                    }
                }
                .appEntityIdentifier(forSelectionType: GeneratedTrack.ID.self) { trackID in
                    EntityIdentifier(for: SongEntity.self, identifier: trackID)
                }
            }
        }
    • 17:23 - Component-based display representation query

      // Component-based display representation queries
        extension PlaylistQuery {
            func displayRepresentations(
                for identifiers: [PlaylistEntity.ID],
                requestedComponents: DisplayRepresentation.Components = .text
            ) async throws -> [PlaylistEntity.ID: DisplayRepresentation] {
                let entities = try await model.playlistEntities(for: identifiers)
      
                // Fetch display representations for fetched entities
                var result: [PlaylistEntity.ID: DisplayRepresentation] = [:]
                for entity in entities {
                    result[entity.id] = await entity.displayRepresentation(with: requestedComponents)
                }
                return result
            }
        }
    • 21:07 - Entity annotations on system integrations

      // (a) User notifications
        import AppIntents
        import UserNotifications
      
        func scheduleNotification(message: Message, author: Contact, conversation: Conversation) {
            let content = UNMutableNotificationContent()
            content.title = author.name
            content.body = message.body
      
            // Annotate with entity identifier
            content.appEntityIdentifiers = [
                EntityIdentifier(for: MessageEntity.self, identifier: message.id)
            ]
            // Schedule the notification
        }
      
        // (b) Now Playing — most specific to least specific
        import NowPlaying
      
        final class CosmoTunesMediaSession: MediaSessionRepresentable {
            var content: (any MediaContentRepresentable)? {
                var content = MusicContent(id: track.id.uuidString, songTitle: track.title /* ... */)
                content.appEntityIdentifiers = [
                    EntityIdentifier(for: SongEntity.self, identifier: track.id),
                    EntityIdentifier(for: ArtistEntity.self, identifier: track.session.artistName),
                    EntityIdentifier(for: PlaylistEntity.self, identifier: currentPlaylist.id),
                ]
                return content
            }
        }
      
        // (c) AlarmKit
        import AlarmKit
      
        func scheduleAlarm(_ alarm: Alarm) async throws {
            let configuration = AlarmManager.AlarmConfiguration<CosmoTunesAlarmMetadata>.alarm(
                schedule: schedule,
                attributes: attributes,
                appEntityIdentifier: EntityIdentifier(for: AlarmEntity.self, identifier: alarm.id),
                stopIntent: DismissAlarmIntent(),
                secondaryIntent: SnoozeAlarmIntent(),
                sound: sound
            )
            // Schedule alarm
        }
    • 0:00 - Introduction
    • Advanced App Intents techniques to make your app's Siri and Apple Intelligence experience feel polished and personal. Agenda: shape the Siri conversation, improve content discovery, and leverage existing integrations, demoed with the CosmoTunes, UnicornChat, and CometCal sample apps.

    • 1:59 - Customize how Siri responds
    • Shape Siri's responses to match your app's voice: return an empty result to let Siri respond, or adopt ProvidesDialog and return an IntentDialog with full and supporting strings. Ask clarifying questions mid-intent with a dialog request (such as requesting an optional timer label).

    • 4:20 - Visual responses
    • Give Siri your app's look: an entity's DisplayRepresentation (title, subtitle, image) is used across responses, disambiguation, Spotlight, and Shortcuts, while a custom SwiftUI snippet view (ShowsSnippetView) styles specific actions. Customize only where it helps, and account for voice-only devices.

    • 6:22 - Interaction donations
    • System interactions are known automatically, but UI interactions aren't, so donate them via IntentDonationManager (using schema-conforming intents) so Apple Intelligence learns app preferences and stays aware of ongoing activities (such as Maps navigation or Clock stopwatches). Donate accurately; excessive donations are ignored.

    • 9:46 - Confirmations and entity ownership
    • Siri auto-confirms intents with meaningful side effects, especially on shared or public content. Conform shareable entities to the new OwnershipProvidingEntity protocol and keep the ownership state current so Siri confirms appropriately, using your display representations as the confirmation visuals.

    • 11:59 - Semantic index with IndexedEntity
    • Make local content discoverable: adopt IndexedEntity and index entities in Spotlight via indexAppEntities for meaning-based search. Keep the index fresh (add, update, delete), and support re-indexing with the new IndexedEntityQuery.

    • 13:32 - Structured search with IntentValueQuery
    • For content too large, server-side, or fast-changing to index, use IntentValueQuery: the system passes a structured search input and you can return multiple entity types. CosmoTunes maps an AudioSearch (query, unspecified, or URL criteria) to a UnionValue of songs and playlists.

    • 15:27 - In-app search
    • Adopt the system searchInApp schema (formerly system.search) so "Show me running playlists in CosmoTunes" re-runs Siri's search inside your own crafted search UI, regardless of which domains you adopt or whether you index entities.

    • 16:22 - Onscreen awareness
    • Connect what's visible to entities so Siri resolves "play the third one." Start with NSUserActivity (single primary item) and View Entity annotations (appEntityIdentifier, one of many); scale up with collection annotations (forSelectionType:) and custom canvas annotations, all supported in UIKit and AppKit. Enable display-representation queries so Siri resolves on-screen entities fast.

    • 20:51 - Leverage existing integrations
    • Attach entities to system integrations you already use: appEntityIdentifiers on UNMutableNotificationContent (reply to announced notifications), on Now Playing via MediaSessionRepresentable (for example "play the live version"), and appEntityIdentifier on AlarmKit's AlarmConfiguration ("snooze it"). Persistent entities only, no transient entities.

    • 23:30 - Next steps
    • Start by customizing entity display representations, then index entities and keep the index current, add IntentValueQuery and in-app search, annotate views and existing integrations, and finally donate UI interactions. See the sample projects and "Code-along: Make your app available to Siri."

Developer Footer

  • ビデオ
  • WWDC26
  • SiriおよびApple Intelligence向けの高度なApp Intent機能
  • メニューを開く メニューを閉じる
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    メニューを開く メニューを閉じる
    • アクセシビリティ
    • アクセサリ
    • Apple Intelligence
    • App Extension
    • App Store
    • オーディオとビデオ(英語)
    • 拡張現実
    • デザイン
    • 配信
    • 教育
    • フォント(英語)
    • ゲーム
    • ヘルスケアとフィットネス
    • アプリ内課金
    • ローカリゼーション
    • マップと位置情報
    • 機械学習とAI
    • オープンソース(英語)
    • セキュリティ
    • SafariとWeb(英語)
    メニューを開く メニューを閉じる
    • 英語ドキュメント(完全版)
    • 日本語ドキュメント(一部トピック)
    • チュートリアル
    • ダウンロード
    • フォーラム(英語)
    • ビデオ
    Open Menu Close Menu
    • サポートドキュメント
    • お問い合わせ
    • バグ報告
    • システム状況(英語)
    メニューを開く メニューを閉じる
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles(英語)
    • フィードバックアシスタント
    メニューを開く メニューを閉じる
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program(英語)
    • Mini Apps Partner Program
    • News Partner Program(英語)
    • Video Partner Program(英語)
    • セキュリティ報奨金プログラム(英語)
    • Security Research Device Program(英語)
    Open Menu Close Menu
    • Appleに相談
    • Apple Developer Center
    • App Store Awards(英語)
    • Apple Design Awards
    • Apple Developer Academy(英語)
    • WWDC
    最新ニュースを読む。
    Apple Developerアプリを入手する。
    Copyright © 2026 Apple Inc. All rights reserved.
    利用規約 プライバシーポリシー 契約とガイドライン