{ "$schema": "https://raw.githubusercontent.com/guitaripod/wwdc-sessions/master/schema/session.schema.json", "schemaVersion": 1, "id": "wwdc2026-295", "event": "wwdc2026", "eventName": "WWDC26", "year": 2026, "eventContentId": 295, "title": "Validate your App Intents adoption with AppIntentsTesting", "description": "Meet AppIntentsTesting, a new framework for validating your App Intents through the same infrastructure used by Siri, Shortcuts, and Spotlight. Discover how to execute intents, inspect results, and test entities and queries — all without requiring UI automation. Find out how to verify integrations like View annotations and Spotlight indexing, helping you catch bugs early in your development workflow.", "url": "https://developer.apple.com/videos/play/wwdc2026/295", "sosumiURL": "https://sosumi.ai/videos/play/wwdc2026/295", "type": "Video", "publishedAt": "2026-06-08T14:00:00-07:00", "platforms": [ "iOS", "iPadOS" ], "keywords": [ "ai", "app intents", "machine learning", "testing", "xcode", "xctest" ], "topics": [ "AI & Machine Learning" ], "primaryTopic": "AI & Machine Learning", "duration": 1557, "hasTranscript": true, "transcriptWordCount": 3137, "availableLanguages": [ "eng", "fra", "jpn", "kor", "por", "spa", "zho" ], "media": { "hls": "https://devstreaming-cdn.apple.com/videos/wwdc/2026/295/4/cdcee6d3-e3e9-4201-b1ef-cd33e2d10e6f/cmaf.m3u8", "downloadHLS": "https://devstreaming-cdn.apple.com/videos/wwdc/2026/295/4/cdcee6d3-e3e9-4201-b1ef-cd33e2d10e6f/cmaf-download.m3u8", "downloadSD": "https://devstreaming-cdn.apple.com/videos/wwdc/2026/295/4/cdcee6d3-e3e9-4201-b1ef-cd33e2d10e6f/downloads/wwdc2026-295_sd.mp4", "downloadHD": "https://devstreaming-cdn.apple.com/videos/wwdc/2026/295/4/cdcee6d3-e3e9-4201-b1ef-cd33e2d10e6f/downloads/wwdc2026-295_hd.mp4", "duration": 1557 }, "codeSnippets": [ { "title": "Your first test: execute an intent", "language": "swift", "startTimeSeconds": 408, "code": "import AppIntentsTesting\n\nfunc testCreateCalendar() async throws {\n let definitions = IntentDefinitions(bundleIdentifier: \"com.example.apple-samplecode.CometCal\")\n let createCalendar = definitions.intents[\"CreateCalendarIntent\"]\n let result = try await createCalendar.makeIntent(\n name: \"Occupy Saturn\",\n color: \"red\"\n ).run()\n XCTAssertEqual(try result.value.title, \"Occupy Saturn\")\n}" }, { "title": "Test an entity string query", "language": "swift", "startTimeSeconds": 745, "code": "// Testing Entity string queries\nfunc testEventStringQuery() async throws {\n let results = try await eventEntityDefinition\n .entities(matching: \"Cosmic Ray\")\n\n XCTAssertEqual(results.count, 1)\n XCTAssertEqual(try results[0].title, \"Cosmic Ray Calibration\")\n}" }, { "title": "Implement the EntityStringQuery under test", "language": "swift", "startTimeSeconds": 780, "code": "// Updated query implementation\nstruct EventEntityQuery: EntityStringQuery {\n func entities(for identifiers: [EventEntity.ID]) async throws -> [EventEntity] {\n\n }\n\n func suggestedEntities() async throws -> [EventEntity] {\n\n }\n\n func entities(matching string: String) async throws -> [EventEntity] {\n try calendarManager.fetchEvents()\n .filter { $0.title.localizedCaseInsensitiveContains(string) }\n .map(\\.entity)\n }\n}" }, { "title": "Chain multiple intents in one test", "language": "swift", "startTimeSeconds": 942, "code": "// Test event creation followed by update\nfunc testCreateAndUpdateEvent() async throws {\n let createResult = try await createEventDefinition.makeIntent(\n title: \"Asteroid Dodgeball Practice\",\n startDate: Date(),\n isAllDay: false,\n calendar: \"Deep Space\"\n ).run()\n\n XCTAssertEqual(try createResult.value.title, \"Asteroid Dodgeball Practice\")\n\n let updateResult = try await updateEventDefinition.makeIntent(\n title: \"Asteroid Dodgeball Rules Overview\",\n event: createResult.value\n ).run()\n\n XCTAssertEqual(try updateResult.value.title, \"Asteroid Dodgeball Rules Overview\")\n}" }, { "title": "Make an intent test-only", "language": "swift", "startTimeSeconds": 1065, "code": "// Test-only intent: SeedSampleEventsIntent\n#if DEBUG\nstruct SeedSampleEventsIntent: AppIntent {\n static let isDiscoverable = false\n\n func perform() async throws -> some IntentResult {\n // Create known list of events\n return .result()\n }\n}\n#endif" }, { "title": "Test Spotlight indexing", "language": "swift", "startTimeSeconds": 1227, "code": "// Testing Spotlight indexing\nfunc testNewEventIndexedInSpotlight() async throws {\n\n let before = try await eventEntityDefinition.spotlightQuery(\"Supernova Viewing Party\")\n XCTAssertTrue(before.isEmpty, \"Event should not exist in Spotlight yet\")\n\n // ... Create \"Supernova Viewing Party\" Event\n\n let after = try await eventEntityDefinition.spotlightQuery(\"Supernova Viewing Party\")\n XCTAssertEqual(after.count, 1)\n XCTAssertEqual(try after[0].title, \"Supernova Viewing Party\")\n}" }, { "title": "Test view annotations", "language": "swift", "startTimeSeconds": 1353, "code": "// Testing view annotations\nfunc testEventViewAnnotation() async throws {\n try await openEventDefinition.makeIntent(target: \"Morning Launch Briefing\").run()\n\n // Confirm correct event page\n let app = XCUIApplication()\n let title = app.staticTexts[\"Morning Launch Briefing\"]\n XCTAssertTrue(title.waitForExistence(timeout: 5))\n\n let annotations = try await eventEntityDefinition.viewAnnotations()\n\n XCTAssertEqual(annotations.count, 1, \"Expected exactly one view annotation\")\n XCTAssertEqual(try annotations[0].entity.title, \"Morning Launch Briefing\")\n}" } ], "resources": [ { "title": "Testing your App Intents code", "url": "https://developer.apple.com/documentation/AppIntentsTesting/testing-your-app-intents-code", "type": "documentation", "description": "Evaluate intents, entities, and queries, and verify your integration with system features like Spotlight and Siri.", "sosumiURL": "https://sosumi.ai/documentation/AppIntentsTesting/testing-your-app-intents-code", "doccJSON": "https://developer.apple.com/tutorials/data/documentation/AppIntentsTesting/testing-your-app-intents-code.json" }, { "title": "App Intents Testing", "url": "https://developer.apple.com/documentation/AppIntentsTesting", "type": "documentation", "description": "Test your app intents, entities, queries, and integration with system features like Siri or Spotlight.", "sosumiURL": "https://sosumi.ai/documentation/AppIntentsTesting", "doccJSON": "https://developer.apple.com/tutorials/data/documentation/AppIntentsTesting.json" } ], "path": "sessions/wwdc2026/295-validate-your-app-intents-adoption-with-appintentstesting/", "files": { "metadata": "sessions/wwdc2026/295-validate-your-app-intents-adoption-with-appintentstesting/metadata.json", "readme": "sessions/wwdc2026/295-validate-your-app-intents-adoption-with-appintentstesting/README.md", "transcript": "sessions/wwdc2026/295-validate-your-app-intents-adoption-with-appintentstesting/transcript.md", "transcriptJSON": "sessions/wwdc2026/295-validate-your-app-intents-adoption-with-appintentstesting/transcript.json" } }