@mmerterden/multi-agent-pipeline 20.7.0 → 20.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/LICENSE +0 -10
- package/docs/facts.json +1 -1
- package/manifest.json +266 -267
- package/package.json +2 -2
- package/pipeline/scripts/_notices.mjs +1 -1
- package/pipeline/skills/.skill-manifest.json +68 -68
- package/pipeline/skills/shared/README.md +70 -70
- package/pipeline/skills/shared/external/alarmkit/SKILL.md +373 -381
- package/pipeline/skills/shared/external/alarmkit/evals/evals.json +23 -18
- package/pipeline/skills/shared/external/alarmkit/references/alarmkit-patterns.md +328 -378
- package/pipeline/skills/shared/external/app-clips/SKILL.md +260 -160
- package/pipeline/skills/shared/external/app-clips/evals/evals.json +27 -27
- package/pipeline/skills/shared/external/app-clips/references/data-handoff-notifications-location.md +150 -83
- package/pipeline/skills/shared/external/app-clips/references/routing-and-experiences.md +135 -83
- package/pipeline/skills/shared/external/app-clips/references/size-capabilities-and-promotion.md +143 -85
- package/pipeline/skills/shared/external/app-intents/SKILL.md +302 -304
- package/pipeline/skills/shared/external/app-intents/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/app-intents/references/appintents-advanced.md +594 -894
- package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +339 -277
- package/pipeline/skills/shared/external/app-store-optimization/evals/evals.json +27 -23
- package/pipeline/skills/shared/external/app-store-optimization/references/keyword-research-methodology.md +105 -122
- package/pipeline/skills/shared/external/app-store-optimization/references/product-page-variants.md +143 -166
- package/pipeline/skills/shared/external/app-store-review/SKILL.md +307 -326
- package/pipeline/skills/shared/external/app-store-review/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/app-store-review/references/privacy-manifest.md +105 -67
- package/pipeline/skills/shared/external/app-store-review/references/review-checklists.md +114 -101
- package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +333 -360
- package/pipeline/skills/shared/external/apple-on-device-ai/evals/evals.json +24 -27
- package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-conversion.md +215 -322
- package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-optimization.md +161 -256
- package/pipeline/skills/shared/external/apple-on-device-ai/references/foundation-models.md +277 -387
- package/pipeline/skills/shared/external/apple-on-device-ai/references/mlx-swift.md +196 -210
- package/pipeline/skills/shared/external/authentication/SKILL.md +265 -381
- package/pipeline/skills/shared/external/authentication/evals/evals.json +25 -25
- package/pipeline/skills/shared/external/authentication/references/keychain-biometric.md +133 -178
- package/pipeline/skills/shared/external/authentication/references/passkeys.md +111 -147
- package/pipeline/skills/shared/external/avkit/SKILL.md +267 -364
- package/pipeline/skills/shared/external/avkit/evals/evals.json +26 -26
- package/pipeline/skills/shared/external/avkit/references/avkit-patterns.md +375 -493
- package/pipeline/skills/shared/external/background-processing/SKILL.md +270 -382
- package/pipeline/skills/shared/external/background-processing/evals/evals.json +22 -22
- package/pipeline/skills/shared/external/background-processing/references/background-task-patterns.md +169 -317
- package/pipeline/skills/shared/external/callkit-voip/SKILL.md +290 -371
- package/pipeline/skills/shared/external/callkit-voip/evals/evals.json +24 -24
- package/pipeline/skills/shared/external/callkit-voip/references/callkit-patterns.md +175 -343
- package/pipeline/skills/shared/external/cloudkit-sync/SKILL.md +292 -381
- package/pipeline/skills/shared/external/cloudkit-sync/evals/evals.json +33 -30
- package/pipeline/skills/shared/external/cloudkit-sync/references/cloudkit-patterns.md +227 -355
- package/pipeline/skills/shared/external/contacts-framework/SKILL.md +197 -346
- package/pipeline/skills/shared/external/contacts-framework/evals/evals.json +19 -21
- package/pipeline/skills/shared/external/contacts-framework/references/contacts-patterns.md +169 -308
- package/pipeline/skills/shared/external/core-bluetooth/SKILL.md +226 -376
- package/pipeline/skills/shared/external/core-bluetooth/evals/evals.json +25 -22
- package/pipeline/skills/shared/external/core-bluetooth/references/ble-patterns.md +257 -337
- package/pipeline/skills/shared/external/core-data/SKILL.md +292 -368
- package/pipeline/skills/shared/external/core-data/evals/evals.json +30 -27
- package/pipeline/skills/shared/external/core-motion/SKILL.md +235 -324
- package/pipeline/skills/shared/external/core-motion/evals/evals.json +31 -27
- package/pipeline/skills/shared/external/core-motion/references/motion-patterns.md +210 -310
- package/pipeline/skills/shared/external/core-nfc/SKILL.md +292 -366
- package/pipeline/skills/shared/external/core-nfc/evals/evals.json +22 -24
- package/pipeline/skills/shared/external/core-nfc/references/nfc-patterns.md +233 -329
- package/pipeline/skills/shared/external/coreml/SKILL.md +323 -367
- package/pipeline/skills/shared/external/coreml/evals/evals.json +24 -21
- package/pipeline/skills/shared/external/coreml/references/coreml-swift-integration.md +562 -565
- package/pipeline/skills/shared/external/cryptokit/SKILL.md +253 -394
- package/pipeline/skills/shared/external/cryptokit/evals/evals.json +20 -18
- package/pipeline/skills/shared/external/cryptokit/references/cryptokit-patterns.md +299 -488
- package/pipeline/skills/shared/external/debugging-instruments/SKILL.md +270 -323
- package/pipeline/skills/shared/external/debugging-instruments/evals/evals.json +27 -30
- package/pipeline/skills/shared/external/debugging-instruments/references/instruments-guide.md +167 -315
- package/pipeline/skills/shared/external/debugging-instruments/references/lldb-patterns.md +140 -193
- package/pipeline/skills/shared/external/device-integrity/SKILL.md +230 -353
- package/pipeline/skills/shared/external/device-integrity/evals/evals.json +25 -21
- package/pipeline/skills/shared/external/device-integrity/references/device-integrity-patterns.md +159 -197
- package/pipeline/skills/shared/external/energykit/SKILL.md +225 -392
- package/pipeline/skills/shared/external/energykit/evals/evals.json +29 -28
- package/pipeline/skills/shared/external/energykit/references/energykit-patterns.md +174 -470
- package/pipeline/skills/shared/external/eventkit-calendar/SKILL.md +261 -383
- package/pipeline/skills/shared/external/eventkit-calendar/evals/evals.json +25 -22
- package/pipeline/skills/shared/external/eventkit-calendar/references/eventkit-patterns.md +165 -268
- package/pipeline/skills/shared/external/healthkit/SKILL.md +252 -303
- package/pipeline/skills/shared/external/healthkit/evals/evals.json +24 -23
- package/pipeline/skills/shared/external/healthkit/references/healthkit-patterns.md +369 -523
- package/pipeline/skills/shared/external/homekit-matter/SKILL.md +233 -348
- package/pipeline/skills/shared/external/homekit-matter/evals/evals.json +27 -22
- package/pipeline/skills/shared/external/homekit-matter/references/matter-commissioning.md +199 -305
- package/pipeline/skills/shared/external/ios-accessibility/SKILL.md +368 -340
- package/pipeline/skills/shared/external/ios-accessibility/evals/evals.json +28 -27
- package/pipeline/skills/shared/external/ios-accessibility/references/a11y-patterns.md +314 -260
- package/pipeline/skills/shared/external/ios-accessibility/references/media-accessibility.md +97 -67
- package/pipeline/skills/shared/external/ios-accessibility/references/nutrition-labels.md +165 -101
- package/pipeline/skills/shared/external/ios-localization/SKILL.md +258 -371
- package/pipeline/skills/shared/external/ios-localization/evals/evals.json +23 -23
- package/pipeline/skills/shared/external/ios-localization/references/formatstyle-locale.md +283 -491
- package/pipeline/skills/shared/external/ios-localization/references/string-catalogs.md +313 -440
- package/pipeline/skills/shared/external/ios-networking/SKILL.md +265 -341
- package/pipeline/skills/shared/external/ios-networking/evals/evals.json +24 -24
- package/pipeline/skills/shared/external/ios-networking/references/background-websocket.md +425 -652
- package/pipeline/skills/shared/external/ios-networking/references/file-storage-patterns.md +143 -285
- package/pipeline/skills/shared/external/ios-networking/references/lightweight-clients.md +93 -53
- package/pipeline/skills/shared/external/ios-networking/references/network-framework.md +231 -456
- package/pipeline/skills/shared/external/ios-networking/references/urlsession-patterns.md +517 -784
- package/pipeline/skills/shared/external/ios-simulator/SKILL.md +265 -393
- package/pipeline/skills/shared/external/ios-simulator/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/ios-simulator/references/simctl-commands.md +177 -270
- package/pipeline/skills/shared/external/live-activities/SKILL.md +318 -360
- package/pipeline/skills/shared/external/live-activities/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/live-activities/references/activitykit-patterns.md +478 -710
- package/pipeline/skills/shared/external/mapkit-location/SKILL.md +295 -267
- package/pipeline/skills/shared/external/mapkit-location/evals/evals.json +28 -24
- package/pipeline/skills/shared/external/mapkit-location/references/mapkit-corelocation-patterns.md +378 -532
- package/pipeline/skills/shared/external/mapkit-location/references/mapkit-patterns.md +397 -499
- package/pipeline/skills/shared/external/metrickit-diagnostics/SKILL.md +165 -348
- package/pipeline/skills/shared/external/metrickit-diagnostics/evals/evals.json +26 -23
- package/pipeline/skills/shared/external/metrickit-diagnostics/references/metrickit-patterns.md +123 -130
- package/pipeline/skills/shared/external/musickit-audio/SKILL.md +189 -315
- package/pipeline/skills/shared/external/musickit-audio/evals/evals.json +22 -21
- package/pipeline/skills/shared/external/musickit-audio/references/musickit-patterns.md +181 -270
- package/pipeline/skills/shared/external/natural-language/SKILL.md +188 -340
- package/pipeline/skills/shared/external/natural-language/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/natural-language/references/translation-patterns.md +171 -225
- package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +258 -392
- package/pipeline/skills/shared/external/passkit-wallet/evals/evals.json +30 -29
- package/pipeline/skills/shared/external/passkit-wallet/references/wallet-passes.md +164 -231
- package/pipeline/skills/shared/external/pdfkit/SKILL.md +312 -344
- package/pipeline/skills/shared/external/pdfkit/evals/evals.json +19 -19
- package/pipeline/skills/shared/external/pdfkit/references/pdfkit-patterns.md +413 -624
- package/pipeline/skills/shared/external/pencilkit-drawing/SKILL.md +242 -358
- package/pipeline/skills/shared/external/pencilkit-drawing/evals/evals.json +25 -21
- package/pipeline/skills/shared/external/pencilkit-drawing/references/pencilkit-patterns.md +161 -226
- package/pipeline/skills/shared/external/permissionkit/SKILL.md +282 -400
- package/pipeline/skills/shared/external/permissionkit/evals/evals.json +27 -30
- package/pipeline/skills/shared/external/permissionkit/references/permissionkit-patterns.md +237 -350
- package/pipeline/skills/shared/external/photos-camera-media/SKILL.md +276 -325
- package/pipeline/skills/shared/external/photos-camera-media/references/av-playback.md +299 -545
- package/pipeline/skills/shared/external/photos-camera-media/references/camera-capture.md +344 -588
- package/pipeline/skills/shared/external/photos-camera-media/references/image-loading-caching.md +316 -660
- package/pipeline/skills/shared/external/photos-camera-media/references/photokit-patterns.md +270 -416
- package/pipeline/skills/shared/external/push-notifications/SKILL.md +312 -340
- package/pipeline/skills/shared/external/push-notifications/evals/evals.json +27 -26
- package/pipeline/skills/shared/external/push-notifications/references/notification-patterns.md +328 -485
- package/pipeline/skills/shared/external/push-notifications/references/rich-notifications.md +327 -560
- package/pipeline/skills/shared/external/realitykit-ar/SKILL.md +218 -410
- package/pipeline/skills/shared/external/realitykit-ar/evals/evals.json +24 -27
- package/pipeline/skills/shared/external/realitykit-ar/references/realitykit-patterns.md +221 -348
- package/pipeline/skills/shared/external/shareplay-activities/SKILL.md +222 -393
- package/pipeline/skills/shared/external/shareplay-activities/evals/evals.json +23 -24
- package/pipeline/skills/shared/external/shareplay-activities/references/shareplay-patterns.md +280 -420
- package/pipeline/skills/shared/external/speech-recognition/SKILL.md +217 -421
- package/pipeline/skills/shared/external/speech-recognition/evals/evals.json +23 -26
- package/pipeline/skills/shared/external/speech-recognition/references/speechanalyzer-patterns.md +133 -125
- package/pipeline/skills/shared/external/storekit/SKILL.md +228 -204
- package/pipeline/skills/shared/external/storekit/evals/evals.json +27 -24
- package/pipeline/skills/shared/external/storekit/references/app-review-guidelines.md +98 -109
- package/pipeline/skills/shared/external/storekit/references/core-patterns.md +298 -242
- package/pipeline/skills/shared/external/storekit/references/storekit-advanced.md +356 -649
- package/pipeline/skills/shared/external/swift-api-design-guidelines/SKILL.md +274 -399
- package/pipeline/skills/shared/external/swift-api-design-guidelines/evals/evals.json +22 -24
- package/pipeline/skills/shared/external/swift-api-design-guidelines/references/argument-labels-and-parameters.md +107 -108
- package/pipeline/skills/shared/external/swift-api-design-guidelines/references/conventions-and-special-rules.md +93 -165
- package/pipeline/skills/shared/external/swift-api-design-guidelines/references/naming-and-clarity.md +99 -137
- package/pipeline/skills/shared/external/swift-api-design-guidelines/references/side-effects-and-mutating-pairs.md +77 -120
- package/pipeline/skills/shared/external/swift-architecture/SKILL.md +334 -350
- package/pipeline/skills/shared/external/swift-architecture/evals/evals.json +22 -22
- package/pipeline/skills/shared/external/swift-charts/SKILL.md +208 -394
- package/pipeline/skills/shared/external/swift-charts/evals/evals.json +27 -30
- package/pipeline/skills/shared/external/swift-charts/references/charts-patterns.md +351 -762
- package/pipeline/skills/shared/external/swift-codable/SKILL.md +339 -343
- package/pipeline/skills/shared/external/swift-codable/evals/evals.json +20 -20
- package/pipeline/skills/shared/external/swift-concurrency/SKILL.md +303 -351
- package/pipeline/skills/shared/external/swift-concurrency/evals/evals.json +27 -24
- package/pipeline/skills/shared/external/swift-concurrency/references/approachable-concurrency.md +65 -80
- package/pipeline/skills/shared/external/swift-concurrency/references/async-algorithms.md +48 -84
- package/pipeline/skills/shared/external/swift-concurrency/references/bridging-interop.md +134 -79
- package/pipeline/skills/shared/external/swift-concurrency/references/concurrency-patterns.md +145 -167
- package/pipeline/skills/shared/external/swift-concurrency/references/diagnostics.md +62 -50
- package/pipeline/skills/shared/external/swift-concurrency/references/swiftui-concurrency.md +92 -121
- package/pipeline/skills/shared/external/swift-concurrency/references/synchronization-primitives.md +177 -241
- package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +258 -234
- package/pipeline/skills/shared/external/swift-language/SKILL.md +342 -382
- package/pipeline/skills/shared/external/swift-language/evals/evals.json +24 -27
- package/pipeline/skills/shared/external/swift-language/references/swift-attributes-interop.md +79 -56
- package/pipeline/skills/shared/external/swift-language/references/swift-patterns-extended.md +297 -340
- package/pipeline/skills/shared/external/swift-security/SKILL.md +180 -161
- package/pipeline/skills/shared/external/swift-security/evals/evals.json +25 -25
- package/pipeline/skills/shared/external/swift-security/references/biometric-authentication.md +314 -469
- package/pipeline/skills/shared/external/swift-security/references/certificate-trust.md +408 -476
- package/pipeline/skills/shared/external/swift-security/references/common-anti-patterns.md +260 -530
- package/pipeline/skills/shared/external/swift-security/references/compliance-owasp-mapping.md +270 -477
- package/pipeline/skills/shared/external/swift-security/references/credential-storage-patterns.md +573 -571
- package/pipeline/skills/shared/external/swift-security/references/cryptokit-public-key.md +370 -441
- package/pipeline/skills/shared/external/swift-security/references/cryptokit-symmetric.md +332 -433
- package/pipeline/skills/shared/external/swift-security/references/keychain-access-control.md +346 -468
- package/pipeline/skills/shared/external/swift-security/references/keychain-fundamentals.md +352 -472
- package/pipeline/skills/shared/external/swift-security/references/keychain-item-classes.md +431 -432
- package/pipeline/skills/shared/external/swift-security/references/keychain-sharing.md +328 -425
- package/pipeline/skills/shared/external/swift-security/references/migration-legacy-stores.md +341 -579
- package/pipeline/skills/shared/external/swift-security/references/secure-enclave.md +396 -457
- package/pipeline/skills/shared/external/swift-security/references/testing-security-code.md +354 -614
- package/pipeline/skills/shared/external/swift-testing/SKILL.md +188 -175
- package/pipeline/skills/shared/external/swift-testing/evals/evals.json +26 -24
- package/pipeline/skills/shared/external/swift-testing/references/testing-advanced.md +80 -84
- package/pipeline/skills/shared/external/swift-testing/references/testing-patterns.md +317 -433
- package/pipeline/skills/shared/external/swiftdata/SKILL.md +392 -256
- package/pipeline/skills/shared/external/swiftdata/evals/evals.json +24 -24
- package/pipeline/skills/shared/external/swiftdata/references/core-data-coexistence.md +206 -402
- package/pipeline/skills/shared/external/swiftdata/references/indexing.md +59 -52
- package/pipeline/skills/shared/external/swiftdata/references/predicate-pitfalls.md +57 -33
- package/pipeline/skills/shared/external/swiftdata/references/swiftdata-advanced.md +354 -747
- package/pipeline/skills/shared/external/swiftdata/references/swiftdata-queries.md +300 -508
- package/pipeline/skills/shared/external/swiftlint/SKILL.md +175 -226
- package/pipeline/skills/shared/external/swiftlint/references/adoption-and-configuration.md +141 -208
- package/pipeline/skills/shared/external/swiftlint/references/custom-rules-and-analyze.md +100 -109
- package/pipeline/skills/shared/external/swiftlint/references/plugins-run-scripts-and-integrations.md +159 -179
- package/pipeline/skills/shared/external/swiftlint/references/rule-reference.md +383 -18
- package/pipeline/skills/shared/external/swiftlint/references/rules-suppressions-and-baselines.md +143 -229
- package/pipeline/skills/shared/external/swiftui-animation/SKILL.md +283 -366
- package/pipeline/skills/shared/external/swiftui-animation/references/animation-advanced.md +396 -608
- package/pipeline/skills/shared/external/swiftui-animation/references/core-animation-bridge.md +336 -385
- package/pipeline/skills/shared/external/swiftui-gestures/SKILL.md +239 -349
- package/pipeline/skills/shared/external/swiftui-gestures/references/gesture-patterns.md +228 -310
- package/pipeline/skills/shared/external/swiftui-layout-components/SKILL.md +260 -249
- package/pipeline/skills/shared/external/swiftui-layout-components/references/form.md +92 -74
- package/pipeline/skills/shared/external/swiftui-layout-components/references/grids.md +112 -177
- package/pipeline/skills/shared/external/swiftui-layout-components/references/list.md +61 -64
- package/pipeline/skills/shared/external/swiftui-layout-components/references/scrollview.md +94 -134
- package/pipeline/skills/shared/external/swiftui-liquid-glass/SKILL.md +193 -225
- package/pipeline/skills/shared/external/swiftui-liquid-glass/references/liquid-glass.md +173 -327
- package/pipeline/skills/shared/external/swiftui-navigation/SKILL.md +193 -168
- package/pipeline/skills/shared/external/swiftui-navigation/references/deeplinks.md +127 -150
- package/pipeline/skills/shared/external/swiftui-navigation/references/navigationstack.md +132 -133
- package/pipeline/skills/shared/external/swiftui-navigation/references/sheets.md +152 -117
- package/pipeline/skills/shared/external/swiftui-navigation/references/tabview.md +106 -140
- package/pipeline/skills/shared/external/swiftui-patterns/SKILL.md +316 -252
- package/pipeline/skills/shared/external/swiftui-patterns/references/architecture-patterns.md +341 -332
- package/pipeline/skills/shared/external/swiftui-patterns/references/deprecated-migration.md +547 -854
- package/pipeline/skills/shared/external/swiftui-patterns/references/design-polish.md +485 -537
- package/pipeline/skills/shared/external/swiftui-patterns/references/platform-and-sharing.md +417 -499
- package/pipeline/skills/shared/external/swiftui-performance/SKILL.md +213 -376
- package/pipeline/skills/shared/external/swiftui-performance/references/demystify-swiftui-performance-wwdc23.md +86 -175
- package/pipeline/skills/shared/external/swiftui-performance/references/optimizing-swiftui-performance-instruments.md +89 -195
- package/pipeline/skills/shared/external/swiftui-performance/references/understanding-hangs-in-your-app.md +95 -182
- package/pipeline/skills/shared/external/swiftui-performance/references/understanding-improving-swiftui-performance.md +71 -149
- package/pipeline/skills/shared/external/swiftui-performance/references/wwdc-session-sources.md +21 -27
- package/pipeline/skills/shared/external/swiftui-uikit-interop/SKILL.md +303 -295
- package/pipeline/skills/shared/external/swiftui-uikit-interop/references/hosting-migration.md +204 -387
- package/pipeline/skills/shared/external/swiftui-uikit-interop/references/representable-recipes.md +469 -683
- package/pipeline/skills/shared/external/swiftui-webkit/SKILL.md +140 -186
- package/pipeline/skills/shared/external/swiftui-webkit/references/loading-and-observation.md +75 -86
- package/pipeline/skills/shared/external/swiftui-webkit/references/local-content-and-custom-schemes.md +63 -60
- package/pipeline/skills/shared/external/swiftui-webkit/references/migration-and-fallbacks.md +69 -137
- package/pipeline/skills/shared/external/swiftui-webkit/references/navigation-and-javascript.md +95 -67
- package/pipeline/skills/shared/external/tipkit/SKILL.md +220 -335
- package/pipeline/skills/shared/external/tipkit/references/tipkit-patterns.md +356 -494
- package/pipeline/skills/shared/external/vision-framework/SKILL.md +260 -375
- package/pipeline/skills/shared/external/vision-framework/references/vision-requests.md +393 -515
- package/pipeline/skills/shared/external/vision-framework/references/visionkit-scanner.md +363 -539
- package/pipeline/skills/shared/external/weatherkit/SKILL.md +152 -310
- package/pipeline/skills/shared/external/weatherkit/references/weatherkit-patterns.md +288 -407
- package/pipeline/skills/shared/external/widgetkit/SKILL.md +216 -288
- package/pipeline/skills/shared/external/widgetkit/references/widgetkit-advanced.md +414 -719
- package/pipeline/skills/shared/external/NOTICE-swift-ios-skills.md +0 -39
|
@@ -1,449 +1,447 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: app-intents
|
|
3
|
-
description: "
|
|
3
|
+
description: "App Intents for Siri, Shortcuts, Spotlight, widgets, Control Center and Apple Intelligence: AppIntent actions, AppEntity and EntityQuery, AppShortcutsProvider phrases, IndexedEntity indexing, WidgetConfigurationIntent, SnippetIntent, assistant schemas. Use when building or reviewing code that exposes app actions or entities to a system surface."
|
|
4
4
|
metadata:
|
|
5
|
-
source:
|
|
5
|
+
source: multi-agent-pipeline
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# App Intents (iOS 26+)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
App Intents is the single framework behind Siri, the Shortcuts app, Spotlight,
|
|
11
|
+
configurable and interactive widgets, controls, and Apple Intelligence. The
|
|
12
|
+
deeper material (every `@Parameter` form, all query types, controls, snippets,
|
|
13
|
+
Visual Intelligence, schemas, Core Spotlight) is in the
|
|
14
|
+
[advanced guide](references/appintents-advanced.md).
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Also covers `AppEnum`, `ControlConfigurationIntent` and `IntentValueQuery`.
|
|
17
|
+
Not for WidgetKit layout or timeline design beyond choosing the intent
|
|
18
|
+
protocol; that belongs to `widgetkit`.
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
- [AppIntent Protocol](#appintent-protocol)
|
|
17
|
-
- [`@Parameter`](#parameter)
|
|
18
|
-
- [AppEntity](#appentity)
|
|
19
|
-
- [EntityQuery (4 Variants)](#entityquery-4-variants)
|
|
20
|
-
- [AppEnum](#appenum)
|
|
21
|
-
- [AppShortcutsProvider](#appshortcutsprovider)
|
|
22
|
-
- [Siri Integration](#siri-integration)
|
|
23
|
-
- [Interactive Widget Intents](#interactive-widget-intents)
|
|
24
|
-
- [Control Center Widgets (iOS 18+)](#control-center-widgets-ios-18)
|
|
25
|
-
- [Spotlight and IndexedEntity (iOS 18+)](#spotlight-and-indexedentity-ios-18)
|
|
26
|
-
- [iOS 26 Additions](#ios-26-additions)
|
|
27
|
-
- [Common Mistakes](#common-mistakes)
|
|
28
|
-
- [Review Checklist](#review-checklist)
|
|
29
|
-
- [References](#references)
|
|
20
|
+
## Triage
|
|
30
21
|
|
|
31
|
-
|
|
22
|
+
### 1. Name the surface
|
|
32
23
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Determine which system feature the intent targets:
|
|
36
|
-
|
|
37
|
-
| Surface | Protocol | Since |
|
|
24
|
+
| Surface | Protocol or macro | Since |
|
|
38
25
|
|---|---|---|
|
|
39
|
-
| Siri
|
|
26
|
+
| Siri and Shortcuts actions | `AppIntent` | iOS 16 |
|
|
40
27
|
| Configurable widget | `WidgetConfigurationIntent` | iOS 17 |
|
|
41
|
-
| Control Center | `ControlConfigurationIntent` | iOS 18 |
|
|
42
|
-
| Spotlight
|
|
43
|
-
| Apple Intelligence | `@AppIntent(schema:)` | iOS 18 |
|
|
44
|
-
| Interactive
|
|
28
|
+
| Control (Control Center, Lock Screen) | `ControlConfigurationIntent` | iOS 18 |
|
|
29
|
+
| Spotlight | `IndexedEntity` | iOS 18 |
|
|
30
|
+
| Apple Intelligence | `@AppIntent(schema:)` and friends | iOS 18 |
|
|
31
|
+
| Interactive snippet | `SnippetIntent` | iOS 26 |
|
|
45
32
|
| Visual Intelligence | `IntentValueQuery` | iOS 26 |
|
|
46
33
|
|
|
47
|
-
###
|
|
34
|
+
### 2. Model the data
|
|
48
35
|
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
- Choose the
|
|
52
|
-
-
|
|
36
|
+
- Expose app data through `AppEntity` shadow types, not the storage model.
|
|
37
|
+
- Use `AppEnum` for a fixed set of choices.
|
|
38
|
+
- Choose the `EntityQuery` variant that matches how values are looked up.
|
|
39
|
+
- Entities meant for search adopt `IndexedEntity` and describe their metadata
|
|
40
|
+
with `indexingKey`.
|
|
53
41
|
|
|
54
|
-
###
|
|
42
|
+
### 3. Write the intent
|
|
55
43
|
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
- Implement `perform() async throws
|
|
59
|
-
-
|
|
60
|
-
- Register phrases
|
|
44
|
+
- Adopt `AppIntent` or the sub-protocol the surface needs.
|
|
45
|
+
- Every input the person supplies is a `@Parameter`.
|
|
46
|
+
- Implement `perform()`; it is `async throws` and returns `some IntentResult`.
|
|
47
|
+
- Give Shortcuts a `parameterSummary`.
|
|
48
|
+
- Register spoken phrases in an `AppShortcutsProvider`.
|
|
61
49
|
|
|
62
|
-
###
|
|
50
|
+
### 4. Check it
|
|
63
51
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
- Confirm `IndexedEntity`
|
|
67
|
-
-
|
|
52
|
+
- Run the action in the Shortcuts app and confirm each parameter resolves.
|
|
53
|
+
- Try the Siri phrases through the intent preview in Xcode.
|
|
54
|
+
- Confirm `IndexedEntity` values really land in a named Spotlight index.
|
|
55
|
+
- Configure the widget once when a `WidgetConfigurationIntent` is involved.
|
|
68
56
|
|
|
69
|
-
## AppIntent
|
|
57
|
+
## AppIntent
|
|
70
58
|
|
|
71
|
-
The system
|
|
72
|
-
`perform()`.
|
|
59
|
+
The system builds the intent with `init()`, fills in parameters, then calls
|
|
60
|
+
`perform()`. A static `title` (a `LocalizedStringResource`) and a
|
|
61
|
+
`parameterSummary` shape how Shortcuts shows it.
|
|
73
62
|
|
|
74
63
|
```swift
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
import AppIntents
|
|
65
|
+
|
|
66
|
+
struct WaterPlantIntent: AppIntent {
|
|
67
|
+
static let title: LocalizedStringResource = "Water Plant"
|
|
68
|
+
static let description = IntentDescription("Logs a watering for one of your plants.")
|
|
78
69
|
|
|
79
|
-
@Parameter(title: "
|
|
80
|
-
|
|
70
|
+
@Parameter(title: "Plant")
|
|
71
|
+
var plant: PlantEntity
|
|
72
|
+
|
|
73
|
+
@Parameter(title: "Cups", default: 1)
|
|
74
|
+
var cups: Int
|
|
81
75
|
|
|
82
76
|
static var parameterSummary: some ParameterSummary {
|
|
83
|
-
Summary("
|
|
77
|
+
Summary("Water \(\.$plant)") { \.$cups }
|
|
84
78
|
}
|
|
85
79
|
|
|
86
|
-
func perform() async throws -> some IntentResult {
|
|
87
|
-
try await
|
|
88
|
-
return .result(dialog: "
|
|
80
|
+
func perform() async throws -> some IntentResult & ProvidesDialog {
|
|
81
|
+
try await CareLog.shared.recordWatering(plantID: plant.id, cups: cups)
|
|
82
|
+
return .result(dialog: "Logged \(cups) cups for \(plant.name).")
|
|
89
83
|
}
|
|
90
84
|
}
|
|
91
85
|
```
|
|
92
86
|
|
|
93
|
-
Optional members:
|
|
94
|
-
`isDiscoverable` (`Bool`), `authenticationPolicy` (`IntentAuthenticationPolicy`).
|
|
95
|
-
|
|
96
|
-
## `@Parameter`
|
|
87
|
+
Optional members:
|
|
97
88
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
`
|
|
89
|
+
- `description`: an `IntentDescription` shown in Shortcuts.
|
|
90
|
+
- `openAppWhenRun`: `Bool`. The iOS 26 SDK deprecates it in favour of
|
|
91
|
+
`supportedModes`; keep it only for older deployment targets.
|
|
92
|
+
- `isDiscoverable`: `Bool`, whether Shortcuts and Spotlight list the intent.
|
|
93
|
+
- `authenticationPolicy`: an `IntentAuthenticationPolicy`.
|
|
102
94
|
|
|
103
|
-
|
|
104
|
-
// Required; the system asks for a value when needed
|
|
105
|
-
@Parameter(title: "Count")
|
|
106
|
-
var count: Int
|
|
95
|
+
## Parameters
|
|
107
96
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
97
|
+
- A non-optional parameter is required; the system asks for it when missing.
|
|
98
|
+
- `default:` pre-fills a value.
|
|
99
|
+
- An optional parameter is never requested on its own. If `perform()` cannot go
|
|
100
|
+
on without it, ask for it there.
|
|
111
101
|
|
|
112
|
-
|
|
113
|
-
@Parameter(title: "
|
|
114
|
-
var
|
|
102
|
+
```swift
|
|
103
|
+
@Parameter(title: "Servings") var servings: Int
|
|
104
|
+
@Parameter(title: "Servings", default: 1) var defaultedServings: Int
|
|
105
|
+
@Parameter(title: "Servings") var maybeServings: Int?
|
|
115
106
|
```
|
|
116
107
|
|
|
117
|
-
|
|
108
|
+
Supported value types:
|
|
118
109
|
|
|
119
|
-
Primitives: `Bool`, `Int`, `Double`, `
|
|
120
|
-
`
|
|
121
|
-
|
|
122
|
-
`
|
|
110
|
+
- Primitives: `String`, `Bool`, `Int`, `Double`, `Decimal`, `Date`, `Duration`,
|
|
111
|
+
`URL`, `Measurement`.
|
|
112
|
+
- `Array` and `Set` of supported types.
|
|
113
|
+
- `IntentPerson` and `IntentFile`.
|
|
114
|
+
- Any `AppEntity` or `AppEnum` you define.
|
|
123
115
|
|
|
124
|
-
|
|
116
|
+
Common initializer shapes:
|
|
125
117
|
|
|
126
118
|
```swift
|
|
127
|
-
|
|
128
|
-
@Parameter(title: "
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
// Numeric slider
|
|
132
|
-
@Parameter(title: "Volume", controlStyle: .slider, inclusiveRange: (0, 100))
|
|
133
|
-
var volume: Int
|
|
134
|
-
|
|
135
|
-
// Options provider (dynamic list)
|
|
136
|
-
@Parameter(title: "Category", optionsProvider: CategoryOptionsProvider())
|
|
137
|
-
var category: Category
|
|
119
|
+
@Parameter(title: "Repeat", default: false) var repeats: Bool
|
|
120
|
+
@Parameter(title: "Dim Level", controlStyle: .slider, inclusiveRange: (0.0, 100.0)) var dimLevel: Double
|
|
121
|
+
@Parameter(title: "Playlist", optionsProvider: PlaylistNames()) var playlist: String
|
|
138
122
|
```
|
|
139
123
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
[
|
|
124
|
+
The slider style exists only for `Double`. Options providers, files,
|
|
125
|
+
measurements, resolvers, disambiguation prompts and input connections all use
|
|
126
|
+
the same initializer pattern; the [advanced guide](references/appintents-advanced.md#parameter-initializers)
|
|
127
|
+
lists each one.
|
|
143
128
|
|
|
144
129
|
## AppEntity
|
|
145
130
|
|
|
146
|
-
Prefer shadow
|
|
147
|
-
|
|
148
|
-
|
|
131
|
+
Prefer a shadow type that mirrors the app model and carries only what the
|
|
132
|
+
system needs. Conforming the app model itself is fine when it is small, stable
|
|
133
|
+
and happy to live inside the App Intents lifecycle.
|
|
149
134
|
|
|
150
135
|
```swift
|
|
151
|
-
struct
|
|
152
|
-
static let defaultQuery =
|
|
153
|
-
static
|
|
154
|
-
|
|
136
|
+
struct PlantEntity: AppEntity {
|
|
137
|
+
static let defaultQuery = PlantQuery()
|
|
138
|
+
static let typeDisplayRepresentation: TypeDisplayRepresentation = "Plant"
|
|
139
|
+
|
|
140
|
+
let id: String
|
|
141
|
+
|
|
142
|
+
@Property(title: "Name")
|
|
143
|
+
var name: String
|
|
155
144
|
|
|
156
|
-
@Property(title: "
|
|
157
|
-
|
|
145
|
+
@Property(title: "Room")
|
|
146
|
+
var room: String
|
|
158
147
|
|
|
159
148
|
var displayRepresentation: DisplayRepresentation {
|
|
160
|
-
DisplayRepresentation(title: "\(name)", subtitle: "
|
|
149
|
+
DisplayRepresentation(title: "\(name)", subtitle: "\(room)")
|
|
161
150
|
}
|
|
162
151
|
|
|
163
|
-
init(from
|
|
164
|
-
|
|
152
|
+
init(from plant: Plant) {
|
|
153
|
+
id = plant.slug
|
|
154
|
+
name = plant.nickname
|
|
155
|
+
room = plant.location
|
|
165
156
|
}
|
|
166
157
|
}
|
|
167
158
|
```
|
|
168
159
|
|
|
169
|
-
Required: `id`, `defaultQuery`
|
|
170
|
-
`typeDisplayRepresentation
|
|
171
|
-
|
|
160
|
+
Required: `id`, a static `defaultQuery`, `displayRepresentation` and a static
|
|
161
|
+
`typeDisplayRepresentation`. Mark a property with `@Property(title:)` to make it
|
|
162
|
+
available for filtering and sorting; anything without it stays private to the
|
|
163
|
+
app.
|
|
164
|
+
`DisplayRepresentation` accepts a plain string literal (`"Preferences"`) but
|
|
165
|
+
not an interpolated one; `"\(name)"` has to go through
|
|
166
|
+
`DisplayRepresentation(title:)`.
|
|
172
167
|
|
|
173
|
-
## EntityQuery
|
|
174
|
-
|
|
175
|
-
### 1. EntityQuery (base -- resolve by ID)
|
|
168
|
+
## EntityQuery variants
|
|
176
169
|
|
|
177
170
|
```swift
|
|
178
|
-
struct
|
|
179
|
-
func entities(for identifiers: [
|
|
180
|
-
|
|
171
|
+
struct PlantQuery: EntityQuery {
|
|
172
|
+
func entities(for identifiers: [PlantEntity.ID]) async throws -> [PlantEntity] {
|
|
173
|
+
await Greenhouse.shared.plants(withIDs: identifiers).map(PlantEntity.init(from:))
|
|
181
174
|
}
|
|
182
|
-
|
|
183
|
-
|
|
175
|
+
|
|
176
|
+
func suggestedEntities() async throws -> [PlantEntity] {
|
|
177
|
+
await Greenhouse.shared.thirstiest(limit: 5).map(PlantEntity.init(from:))
|
|
184
178
|
}
|
|
185
179
|
}
|
|
186
180
|
```
|
|
187
181
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
Implement `allEntities()` when the full set is small and enumerable.
|
|
195
|
-
|
|
196
|
-
### 4. UniqueAppEntityQuery (singleton, iOS 18+)
|
|
197
|
-
|
|
198
|
-
Use for single-instance entities like app settings; implement `uniqueEntity()`.
|
|
182
|
+
| Variant | Adds | Use when |
|
|
183
|
+
|---|---|---|
|
|
184
|
+
| `EntityQuery` | `entities(for:)` lookup by ID | always the base |
|
|
185
|
+
| `EntityStringQuery` | `entities(matching:)` free-text search | people search by name |
|
|
186
|
+
| `EnumerableEntityQuery` | `allEntities()` | the whole set is small |
|
|
187
|
+
| `UniqueAppEntityQuery` (iOS 18+) | `uniqueEntity()` | exactly one instance, such as app settings |
|
|
199
188
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
filter and sort support.
|
|
189
|
+
Full versions of the last three, and `EntityPropertyQuery` with filtering and
|
|
190
|
+
sorting, are in the [advanced guide](references/appintents-advanced.md#entity-queries).
|
|
203
191
|
|
|
204
192
|
## AppEnum
|
|
205
193
|
|
|
206
|
-
|
|
207
|
-
`
|
|
208
|
-
identifiers.
|
|
194
|
+
For a closed set of choices. `RawValue` must be `LosslessStringConvertible`;
|
|
195
|
+
`String` raw values read well and stay stable as identifiers.
|
|
209
196
|
|
|
210
197
|
```swift
|
|
211
|
-
enum
|
|
212
|
-
case
|
|
213
|
-
|
|
214
|
-
static
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
.
|
|
218
|
-
.
|
|
219
|
-
.large: "Large"
|
|
198
|
+
enum LightLevel: String, AppEnum {
|
|
199
|
+
case shade, indirect, direct
|
|
200
|
+
|
|
201
|
+
static let typeDisplayRepresentation: TypeDisplayRepresentation = "Light Level"
|
|
202
|
+
static let caseDisplayRepresentations: [LightLevel: DisplayRepresentation] = [
|
|
203
|
+
.shade: "Shade",
|
|
204
|
+
.indirect: "Bright Indirect",
|
|
205
|
+
.direct: "Direct Sun",
|
|
220
206
|
]
|
|
221
207
|
}
|
|
222
208
|
```
|
|
223
209
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
enum Priority: Int, AppEnum {
|
|
227
|
-
case low = 1, medium = 2, high = 3
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// Preferred
|
|
231
|
-
enum Priority: String, AppEnum {
|
|
232
|
-
case low, medium, high
|
|
233
|
-
// ...
|
|
234
|
-
}
|
|
235
|
-
```
|
|
210
|
+
An `Int`-backed enum works, but its values are opaque in saved shortcuts and in
|
|
211
|
+
URL representations.
|
|
236
212
|
|
|
237
213
|
## AppShortcutsProvider
|
|
238
214
|
|
|
239
|
-
|
|
240
|
-
|
|
215
|
+
Anything registered here is ready to use from Siri and Shortcuts the moment the
|
|
216
|
+
app is installed.
|
|
241
217
|
|
|
242
218
|
```swift
|
|
243
|
-
struct
|
|
219
|
+
struct GreenhouseShortcuts: AppShortcutsProvider {
|
|
244
220
|
static var appShortcuts: [AppShortcut] {
|
|
245
221
|
AppShortcut(
|
|
246
|
-
intent:
|
|
222
|
+
intent: WaterPlantIntent(),
|
|
247
223
|
phrases: [
|
|
248
|
-
"
|
|
249
|
-
"
|
|
224
|
+
"Water a plant in \(.applicationName)",
|
|
225
|
+
"Water \(\.$plant) with \(.applicationName)",
|
|
250
226
|
],
|
|
251
|
-
shortTitle: "
|
|
252
|
-
systemImageName: "
|
|
227
|
+
shortTitle: "Water Plant",
|
|
228
|
+
systemImageName: "drop.fill"
|
|
253
229
|
)
|
|
254
230
|
}
|
|
255
231
|
|
|
256
|
-
static
|
|
232
|
+
static let shortcutTileColor: ShortcutTileColor = .navy
|
|
257
233
|
}
|
|
258
234
|
```
|
|
259
235
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
-
|
|
263
|
-
|
|
264
|
-
-
|
|
265
|
-
- Use `negativePhrases` to prevent false Siri activations.
|
|
266
|
-
|
|
267
|
-
## Siri Integration
|
|
236
|
+
- Every phrase must include `\(.applicationName)`.
|
|
237
|
+
- Phrases may name parameters, such as `\(\.$plant)`.
|
|
238
|
+
- When the values behind a parameter change, call
|
|
239
|
+
`GreenhouseShortcuts.updateAppShortcutParameters()`.
|
|
240
|
+
- Add `negativePhrases` to stop Siri firing on similar-sounding requests.
|
|
268
241
|
|
|
269
|
-
|
|
242
|
+
## Siri
|
|
270
243
|
|
|
271
|
-
Donate
|
|
244
|
+
Donate an intent after the person performs the action in the app, so the system
|
|
245
|
+
learns the habit and can suggest it in Spotlight:
|
|
272
246
|
|
|
273
247
|
```swift
|
|
274
|
-
let
|
|
275
|
-
|
|
276
|
-
try await
|
|
248
|
+
let done = WaterPlantIntent()
|
|
249
|
+
done.plant = PlantEntity(from: fern)
|
|
250
|
+
try await done.donate()
|
|
277
251
|
```
|
|
278
252
|
|
|
279
|
-
|
|
253
|
+
Adopt `PredictableIntent` when Siri should be able to predict the next action.
|
|
280
254
|
|
|
281
|
-
|
|
255
|
+
## Widgets
|
|
282
256
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
deletion, use an appropriate `authenticationPolicy` and/or
|
|
290
|
-
`requestConfirmation(...)` before changing state.
|
|
257
|
+
Interactive widgets run an `AppIntent` from a `Button` or `Toggle`. A
|
|
258
|
+
`WidgetConfigurationIntent` carries the widget's settings. Treat it as a
|
|
259
|
+
parameter contract; any change of state belongs to its own action intent. Actions that
|
|
260
|
+
unlock doors, move money, delete data and the like need an
|
|
261
|
+
`authenticationPolicy`, a `requestConfirmation(...)` step, or both, before any
|
|
262
|
+
state changes.
|
|
291
263
|
|
|
292
264
|
```swift
|
|
293
|
-
struct
|
|
294
|
-
static
|
|
295
|
-
|
|
265
|
+
struct MarkWateredIntent: AppIntent {
|
|
266
|
+
static let title: LocalizedStringResource = "Mark Watered"
|
|
267
|
+
|
|
268
|
+
@Parameter(title: "Plant ID")
|
|
269
|
+
var plantID: String
|
|
270
|
+
|
|
271
|
+
init() {}
|
|
272
|
+
init(plantID: String) { self.plantID = plantID }
|
|
296
273
|
|
|
297
274
|
func perform() async throws -> some IntentResult {
|
|
298
|
-
|
|
275
|
+
await Greenhouse.shared.markWatered(plantID)
|
|
299
276
|
return .result()
|
|
300
277
|
}
|
|
301
278
|
}
|
|
302
279
|
|
|
303
|
-
//
|
|
304
|
-
Button(intent:
|
|
305
|
-
Image(systemName: entry.isFavorite ? "heart.fill" : "heart")
|
|
306
|
-
}
|
|
280
|
+
// Inside the widget view:
|
|
281
|
+
// Button(intent: MarkWateredIntent(plantID: plant.slug)) { Image(systemName: "drop") }
|
|
307
282
|
```
|
|
308
283
|
|
|
309
284
|
### WidgetConfigurationIntent
|
|
310
285
|
|
|
311
286
|
```swift
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
287
|
+
import WidgetKit
|
|
288
|
+
|
|
289
|
+
struct RoomWidgetConfig: WidgetConfigurationIntent {
|
|
290
|
+
static let title: LocalizedStringResource = "Room"
|
|
291
|
+
|
|
292
|
+
@Parameter(title: "Room", default: "Kitchen")
|
|
293
|
+
var room: String
|
|
315
294
|
}
|
|
316
295
|
|
|
317
|
-
|
|
318
|
-
struct MyWidget: Widget {
|
|
296
|
+
struct RoomWidget: Widget {
|
|
319
297
|
var body: some WidgetConfiguration {
|
|
320
|
-
AppIntentConfiguration(kind: "
|
|
321
|
-
|
|
298
|
+
AppIntentConfiguration(kind: "RoomWidget", intent: RoomWidgetConfig.self, provider: RoomTimeline()) { entry in
|
|
299
|
+
RoomWidgetView(entry: entry)
|
|
322
300
|
}
|
|
323
301
|
}
|
|
324
302
|
}
|
|
325
303
|
```
|
|
326
304
|
|
|
327
|
-
##
|
|
305
|
+
## Controls (iOS 18+)
|
|
306
|
+
|
|
307
|
+
Controls in Control Center and on the Lock Screen pair a
|
|
308
|
+
`ControlConfigurationIntent` with a `ControlWidget`.
|
|
328
309
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
explicit
|
|
310
|
+
- Give every parameter a default or make it optional. The system renders the
|
|
311
|
+
control before anyone has configured it.
|
|
312
|
+
- State changes happen in a separate `AppIntent` or `SetValueIntent` that takes
|
|
313
|
+
explicit parameters, never in the configuration intent.
|
|
333
314
|
|
|
334
315
|
```swift
|
|
335
|
-
struct
|
|
336
|
-
static
|
|
337
|
-
|
|
316
|
+
struct MisterControlConfig: ControlConfigurationIntent {
|
|
317
|
+
static let title: LocalizedStringResource = "Mister"
|
|
318
|
+
|
|
319
|
+
@Parameter(title: "Zone", default: .nursery)
|
|
320
|
+
var zone: GreenhouseZone
|
|
338
321
|
}
|
|
339
322
|
```
|
|
340
323
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
confirmation and authentication.
|
|
324
|
+
The complete control wiring is in the
|
|
325
|
+
[advanced guide](references/appintents-advanced.md#controls).
|
|
344
326
|
|
|
345
327
|
## Spotlight and IndexedEntity (iOS 18+)
|
|
346
328
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
329
|
+
Adopt `IndexedEntity` to make entities searchable. `indexingKey` ties a
|
|
330
|
+
property to a `CSSearchableItemAttributeSet` key path: on `@Property` from
|
|
331
|
+
iOS 18.4, on `@ComputedProperty` from iOS 26.
|
|
350
332
|
|
|
351
333
|
```swift
|
|
352
|
-
|
|
353
|
-
static let defaultQuery = RecipeQuery()
|
|
354
|
-
static var typeDisplayRepresentation: TypeDisplayRepresentation = "Recipe"
|
|
355
|
-
var id: String // Stable recipe UUID or slug; do not use recycled row IDs
|
|
334
|
+
import CoreSpotlight
|
|
356
335
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
336
|
+
struct CareGuideEntity: IndexedEntity {
|
|
337
|
+
static let defaultQuery = CareGuideQuery()
|
|
338
|
+
static let typeDisplayRepresentation: TypeDisplayRepresentation = "Care Guide"
|
|
360
339
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
340
|
+
let id: UUID
|
|
341
|
+
|
|
342
|
+
@Property(title: "Title", indexingKey: \.title)
|
|
343
|
+
var title: String
|
|
344
|
+
|
|
345
|
+
var steps: [String]
|
|
346
|
+
|
|
347
|
+
@ComputedProperty(indexingKey: \.contentDescription)
|
|
348
|
+
var overview: String { steps.prefix(2).joined(separator: " ") }
|
|
349
|
+
|
|
350
|
+
var displayRepresentation: DisplayRepresentation { DisplayRepresentation(title: "\(title)") }
|
|
364
351
|
}
|
|
352
|
+
|
|
353
|
+
// try await CSSearchableIndex(name: "guides").indexAppEntities(guides)
|
|
365
354
|
```
|
|
366
355
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
356
|
+
- IDs must be stable: a UUID or slug, never a database row ID that can be
|
|
357
|
+
reused.
|
|
358
|
+
- `IndexedEntity` only describes metadata. The instances still have to be
|
|
359
|
+
indexed into a named index.
|
|
360
|
+
- Tapped results need somewhere to go: add an `OpenIntent` for the entity
|
|
361
|
+
type.
|
|
362
|
+
- If you override `attributeSet`, begin from `defaultAttributeSet`. A brand-new
|
|
363
|
+
attribute set discards the display representation and the property-derived
|
|
364
|
+
values.
|
|
365
|
+
- When the entity already exposes the value, `indexingKey` is the better tool.
|
|
373
366
|
|
|
374
|
-
|
|
375
|
-
the available `@Property` / `@ComputedProperty` indexing keys, updating and
|
|
376
|
-
deleting indexed entities, batch indexing with client state for crash recovery,
|
|
377
|
-
and direct Core Spotlight usage.
|
|
367
|
+
Details: [Spotlight section of the advanced guide](references/appintents-advanced.md#spotlight).
|
|
378
368
|
|
|
379
|
-
## iOS 26
|
|
369
|
+
## iOS 26 additions
|
|
380
370
|
|
|
381
371
|
### SnippetIntent
|
|
382
372
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
`
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
### IntentValueQuery
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
3.
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
- [ ]
|
|
435
|
-
|
|
436
|
-
- [ ] `
|
|
437
|
-
- [ ] `
|
|
438
|
-
|
|
439
|
-
- [ ]
|
|
440
|
-
- [ ]
|
|
441
|
-
|
|
442
|
-
- [ ]
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
- [ ]
|
|
373
|
+
A `SnippetIntent` draws an interactive snippet in system UI. The system may
|
|
374
|
+
call its `perform()` many times, including after each button or toggle inside
|
|
375
|
+
the snippet, so `perform()` must not change anything. Mutate in the intent that
|
|
376
|
+
presented the snippet or in the snippet's button and toggle actions. A
|
|
377
|
+
snippet-only intent is hidden from Shortcuts and Spotlight unless
|
|
378
|
+
`isDiscoverable` is `true`. Example:
|
|
379
|
+
[advanced guide](references/appintents-advanced.md#snippets).
|
|
380
|
+
|
|
381
|
+
### IntentValueQuery for Visual Intelligence
|
|
382
|
+
|
|
383
|
+
`IntentValueQuery` answers a Visual Intelligence `SemanticContentDescriptor`
|
|
384
|
+
with app entities.
|
|
385
|
+
|
|
386
|
+
- Only one `IntentValueQuery` in the app may take `SemanticContentDescriptor`.
|
|
387
|
+
To return several entity types from it, use a `@UnionValue` type.
|
|
388
|
+
- Return a short, ranked list and honour cancellation.
|
|
389
|
+
- Give each result a way in: an `OpenIntent`, a URL, or in-app search.
|
|
390
|
+
- Do not start camera capture, Vision `VN*` requests or Spotlight indexing
|
|
391
|
+
inside the query. Call an existing, bounded search or image-matching service.
|
|
392
|
+
|
|
393
|
+
Example: [advanced guide](references/appintents-advanced.md#visual-intelligence).
|
|
394
|
+
|
|
395
|
+
## Common mistakes
|
|
396
|
+
|
|
397
|
+
1. Exposing the whole model through `AppEntity`. Use shadow types with stable,
|
|
398
|
+
persistent IDs and only the properties the system needs.
|
|
399
|
+
2. Phrases without `\(.applicationName)`. Siri depends on it to tell apps apart.
|
|
400
|
+
3. Treating an optional `@Parameter` as if the system will fill it. Ask with
|
|
401
|
+
`requestValue` or throw `needsValueError` when you need it.
|
|
402
|
+
4. `AppEnum` raw values that drift. `Int` compiles, but `String` survives in
|
|
403
|
+
saved shortcuts and URLs.
|
|
404
|
+
5. No `suggestedEntities()`, so the Shortcuts picker opens empty.
|
|
405
|
+
6. Throwing from `entities(for:)` for IDs that no longer exist. Leave them out
|
|
406
|
+
of the result instead.
|
|
407
|
+
7. A stale Spotlight index. Re-index into the same named `CSSearchableIndex`.
|
|
408
|
+
8. No `typeDisplayRepresentation`. Entities and enums alike must declare one.
|
|
409
|
+
9. Reaching for the old `@Assistant*` macros. Their replacements are `@AppIntent(schema:)`,
|
|
410
|
+
`@AppEntity(schema:)` and `@AppEnum(schema:)`.
|
|
411
|
+
10. A `perform()` that blocks or has side effects it should not. `await` all
|
|
412
|
+
I/O, and keep `SnippetIntent.perform()` free of side effects because it
|
|
413
|
+
reruns.
|
|
414
|
+
11. Changing sensitive state from a system surface with no guard: locks,
|
|
415
|
+
lights, purchases, deletions. Add confirmation, authentication, or both.
|
|
416
|
+
|
|
417
|
+
## Review checklist
|
|
418
|
+
|
|
419
|
+
- [ ] Every `AppIntent` has a verb-plus-noun `title` in title case
|
|
420
|
+
- [ ] Required parameters are non-optional; optional ones are requested when
|
|
421
|
+
`perform()` needs them
|
|
422
|
+
- [ ] `AppEntity` types have stable IDs and expose only system-facing
|
|
423
|
+
properties
|
|
424
|
+
- [ ] `AppEntity` types define `displayRepresentation` and
|
|
425
|
+
`typeDisplayRepresentation`
|
|
426
|
+
- [ ] `entities(for:)` skips unknown IDs, and `suggestedEntities()` exists
|
|
427
|
+
- [ ] `AppEnum` types use stable `String` raw values and define
|
|
428
|
+
`caseDisplayRepresentations`
|
|
429
|
+
- [ ] Every phrase contains `\(.applicationName)`, and `parameterSummary` is set
|
|
430
|
+
- [ ] Spotlight metadata comes from `indexingKey` key paths on the entity's
|
|
431
|
+
properties, and the entities are really indexed
|
|
432
|
+
- [ ] Controls use `ControlConfigurationIntent`, widgets use
|
|
433
|
+
`WidgetConfigurationIntent`, and control parameters without defaults are
|
|
434
|
+
optional
|
|
435
|
+
- [ ] Sensitive intents confirm, authenticate, or both before mutating
|
|
436
|
+
- [ ] A Visual Intelligence `IntentValueQuery` takes `SemanticContentDescriptor`,
|
|
437
|
+
caps its results, offers a way to open them and is gated to iOS 26
|
|
438
|
+
- [ ] No `@AssistantIntent`, `@AssistantEntity` or `@AssistantEnum`
|
|
439
|
+
- [ ] `perform()` is async and non-blocking, runs in the isolation you expect,
|
|
440
|
+
and intent types are `Sendable`
|
|
446
441
|
|
|
447
442
|
## References
|
|
448
443
|
|
|
449
|
-
|
|
444
|
+
The [advanced guide](references/appintents-advanced.md) covers every
|
|
445
|
+
`@Parameter` form, `EntityPropertyQuery`, assistant schemas, Focus filters,
|
|
446
|
+
SiriKit migration, errors and dialogs, confirmation, authentication, URL
|
|
447
|
+
representations and Spotlight indexing.
|