@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.
Files changed (264) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE +0 -10
  3. package/docs/facts.json +1 -1
  4. package/manifest.json +266 -267
  5. package/package.json +2 -2
  6. package/pipeline/scripts/_notices.mjs +1 -1
  7. package/pipeline/skills/.skill-manifest.json +68 -68
  8. package/pipeline/skills/shared/README.md +70 -70
  9. package/pipeline/skills/shared/external/alarmkit/SKILL.md +373 -381
  10. package/pipeline/skills/shared/external/alarmkit/evals/evals.json +23 -18
  11. package/pipeline/skills/shared/external/alarmkit/references/alarmkit-patterns.md +328 -378
  12. package/pipeline/skills/shared/external/app-clips/SKILL.md +260 -160
  13. package/pipeline/skills/shared/external/app-clips/evals/evals.json +27 -27
  14. package/pipeline/skills/shared/external/app-clips/references/data-handoff-notifications-location.md +150 -83
  15. package/pipeline/skills/shared/external/app-clips/references/routing-and-experiences.md +135 -83
  16. package/pipeline/skills/shared/external/app-clips/references/size-capabilities-and-promotion.md +143 -85
  17. package/pipeline/skills/shared/external/app-intents/SKILL.md +302 -304
  18. package/pipeline/skills/shared/external/app-intents/evals/evals.json +21 -21
  19. package/pipeline/skills/shared/external/app-intents/references/appintents-advanced.md +594 -894
  20. package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +339 -277
  21. package/pipeline/skills/shared/external/app-store-optimization/evals/evals.json +27 -23
  22. package/pipeline/skills/shared/external/app-store-optimization/references/keyword-research-methodology.md +105 -122
  23. package/pipeline/skills/shared/external/app-store-optimization/references/product-page-variants.md +143 -166
  24. package/pipeline/skills/shared/external/app-store-review/SKILL.md +307 -326
  25. package/pipeline/skills/shared/external/app-store-review/evals/evals.json +21 -21
  26. package/pipeline/skills/shared/external/app-store-review/references/privacy-manifest.md +105 -67
  27. package/pipeline/skills/shared/external/app-store-review/references/review-checklists.md +114 -101
  28. package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +333 -360
  29. package/pipeline/skills/shared/external/apple-on-device-ai/evals/evals.json +24 -27
  30. package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-conversion.md +215 -322
  31. package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-optimization.md +161 -256
  32. package/pipeline/skills/shared/external/apple-on-device-ai/references/foundation-models.md +277 -387
  33. package/pipeline/skills/shared/external/apple-on-device-ai/references/mlx-swift.md +196 -210
  34. package/pipeline/skills/shared/external/authentication/SKILL.md +265 -381
  35. package/pipeline/skills/shared/external/authentication/evals/evals.json +25 -25
  36. package/pipeline/skills/shared/external/authentication/references/keychain-biometric.md +133 -178
  37. package/pipeline/skills/shared/external/authentication/references/passkeys.md +111 -147
  38. package/pipeline/skills/shared/external/avkit/SKILL.md +267 -364
  39. package/pipeline/skills/shared/external/avkit/evals/evals.json +26 -26
  40. package/pipeline/skills/shared/external/avkit/references/avkit-patterns.md +375 -493
  41. package/pipeline/skills/shared/external/background-processing/SKILL.md +270 -382
  42. package/pipeline/skills/shared/external/background-processing/evals/evals.json +22 -22
  43. package/pipeline/skills/shared/external/background-processing/references/background-task-patterns.md +169 -317
  44. package/pipeline/skills/shared/external/callkit-voip/SKILL.md +290 -371
  45. package/pipeline/skills/shared/external/callkit-voip/evals/evals.json +24 -24
  46. package/pipeline/skills/shared/external/callkit-voip/references/callkit-patterns.md +175 -343
  47. package/pipeline/skills/shared/external/cloudkit-sync/SKILL.md +292 -381
  48. package/pipeline/skills/shared/external/cloudkit-sync/evals/evals.json +33 -30
  49. package/pipeline/skills/shared/external/cloudkit-sync/references/cloudkit-patterns.md +227 -355
  50. package/pipeline/skills/shared/external/contacts-framework/SKILL.md +197 -346
  51. package/pipeline/skills/shared/external/contacts-framework/evals/evals.json +19 -21
  52. package/pipeline/skills/shared/external/contacts-framework/references/contacts-patterns.md +169 -308
  53. package/pipeline/skills/shared/external/core-bluetooth/SKILL.md +226 -376
  54. package/pipeline/skills/shared/external/core-bluetooth/evals/evals.json +25 -22
  55. package/pipeline/skills/shared/external/core-bluetooth/references/ble-patterns.md +257 -337
  56. package/pipeline/skills/shared/external/core-data/SKILL.md +292 -368
  57. package/pipeline/skills/shared/external/core-data/evals/evals.json +30 -27
  58. package/pipeline/skills/shared/external/core-motion/SKILL.md +235 -324
  59. package/pipeline/skills/shared/external/core-motion/evals/evals.json +31 -27
  60. package/pipeline/skills/shared/external/core-motion/references/motion-patterns.md +210 -310
  61. package/pipeline/skills/shared/external/core-nfc/SKILL.md +292 -366
  62. package/pipeline/skills/shared/external/core-nfc/evals/evals.json +22 -24
  63. package/pipeline/skills/shared/external/core-nfc/references/nfc-patterns.md +233 -329
  64. package/pipeline/skills/shared/external/coreml/SKILL.md +323 -367
  65. package/pipeline/skills/shared/external/coreml/evals/evals.json +24 -21
  66. package/pipeline/skills/shared/external/coreml/references/coreml-swift-integration.md +562 -565
  67. package/pipeline/skills/shared/external/cryptokit/SKILL.md +253 -394
  68. package/pipeline/skills/shared/external/cryptokit/evals/evals.json +20 -18
  69. package/pipeline/skills/shared/external/cryptokit/references/cryptokit-patterns.md +299 -488
  70. package/pipeline/skills/shared/external/debugging-instruments/SKILL.md +270 -323
  71. package/pipeline/skills/shared/external/debugging-instruments/evals/evals.json +27 -30
  72. package/pipeline/skills/shared/external/debugging-instruments/references/instruments-guide.md +167 -315
  73. package/pipeline/skills/shared/external/debugging-instruments/references/lldb-patterns.md +140 -193
  74. package/pipeline/skills/shared/external/device-integrity/SKILL.md +230 -353
  75. package/pipeline/skills/shared/external/device-integrity/evals/evals.json +25 -21
  76. package/pipeline/skills/shared/external/device-integrity/references/device-integrity-patterns.md +159 -197
  77. package/pipeline/skills/shared/external/energykit/SKILL.md +225 -392
  78. package/pipeline/skills/shared/external/energykit/evals/evals.json +29 -28
  79. package/pipeline/skills/shared/external/energykit/references/energykit-patterns.md +174 -470
  80. package/pipeline/skills/shared/external/eventkit-calendar/SKILL.md +261 -383
  81. package/pipeline/skills/shared/external/eventkit-calendar/evals/evals.json +25 -22
  82. package/pipeline/skills/shared/external/eventkit-calendar/references/eventkit-patterns.md +165 -268
  83. package/pipeline/skills/shared/external/healthkit/SKILL.md +252 -303
  84. package/pipeline/skills/shared/external/healthkit/evals/evals.json +24 -23
  85. package/pipeline/skills/shared/external/healthkit/references/healthkit-patterns.md +369 -523
  86. package/pipeline/skills/shared/external/homekit-matter/SKILL.md +233 -348
  87. package/pipeline/skills/shared/external/homekit-matter/evals/evals.json +27 -22
  88. package/pipeline/skills/shared/external/homekit-matter/references/matter-commissioning.md +199 -305
  89. package/pipeline/skills/shared/external/ios-accessibility/SKILL.md +368 -340
  90. package/pipeline/skills/shared/external/ios-accessibility/evals/evals.json +28 -27
  91. package/pipeline/skills/shared/external/ios-accessibility/references/a11y-patterns.md +314 -260
  92. package/pipeline/skills/shared/external/ios-accessibility/references/media-accessibility.md +97 -67
  93. package/pipeline/skills/shared/external/ios-accessibility/references/nutrition-labels.md +165 -101
  94. package/pipeline/skills/shared/external/ios-localization/SKILL.md +258 -371
  95. package/pipeline/skills/shared/external/ios-localization/evals/evals.json +23 -23
  96. package/pipeline/skills/shared/external/ios-localization/references/formatstyle-locale.md +283 -491
  97. package/pipeline/skills/shared/external/ios-localization/references/string-catalogs.md +313 -440
  98. package/pipeline/skills/shared/external/ios-networking/SKILL.md +265 -341
  99. package/pipeline/skills/shared/external/ios-networking/evals/evals.json +24 -24
  100. package/pipeline/skills/shared/external/ios-networking/references/background-websocket.md +425 -652
  101. package/pipeline/skills/shared/external/ios-networking/references/file-storage-patterns.md +143 -285
  102. package/pipeline/skills/shared/external/ios-networking/references/lightweight-clients.md +93 -53
  103. package/pipeline/skills/shared/external/ios-networking/references/network-framework.md +231 -456
  104. package/pipeline/skills/shared/external/ios-networking/references/urlsession-patterns.md +517 -784
  105. package/pipeline/skills/shared/external/ios-simulator/SKILL.md +265 -393
  106. package/pipeline/skills/shared/external/ios-simulator/evals/evals.json +21 -21
  107. package/pipeline/skills/shared/external/ios-simulator/references/simctl-commands.md +177 -270
  108. package/pipeline/skills/shared/external/live-activities/SKILL.md +318 -360
  109. package/pipeline/skills/shared/external/live-activities/evals/evals.json +21 -21
  110. package/pipeline/skills/shared/external/live-activities/references/activitykit-patterns.md +478 -710
  111. package/pipeline/skills/shared/external/mapkit-location/SKILL.md +295 -267
  112. package/pipeline/skills/shared/external/mapkit-location/evals/evals.json +28 -24
  113. package/pipeline/skills/shared/external/mapkit-location/references/mapkit-corelocation-patterns.md +378 -532
  114. package/pipeline/skills/shared/external/mapkit-location/references/mapkit-patterns.md +397 -499
  115. package/pipeline/skills/shared/external/metrickit-diagnostics/SKILL.md +165 -348
  116. package/pipeline/skills/shared/external/metrickit-diagnostics/evals/evals.json +26 -23
  117. package/pipeline/skills/shared/external/metrickit-diagnostics/references/metrickit-patterns.md +123 -130
  118. package/pipeline/skills/shared/external/musickit-audio/SKILL.md +189 -315
  119. package/pipeline/skills/shared/external/musickit-audio/evals/evals.json +22 -21
  120. package/pipeline/skills/shared/external/musickit-audio/references/musickit-patterns.md +181 -270
  121. package/pipeline/skills/shared/external/natural-language/SKILL.md +188 -340
  122. package/pipeline/skills/shared/external/natural-language/evals/evals.json +21 -21
  123. package/pipeline/skills/shared/external/natural-language/references/translation-patterns.md +171 -225
  124. package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +258 -392
  125. package/pipeline/skills/shared/external/passkit-wallet/evals/evals.json +30 -29
  126. package/pipeline/skills/shared/external/passkit-wallet/references/wallet-passes.md +164 -231
  127. package/pipeline/skills/shared/external/pdfkit/SKILL.md +312 -344
  128. package/pipeline/skills/shared/external/pdfkit/evals/evals.json +19 -19
  129. package/pipeline/skills/shared/external/pdfkit/references/pdfkit-patterns.md +413 -624
  130. package/pipeline/skills/shared/external/pencilkit-drawing/SKILL.md +242 -358
  131. package/pipeline/skills/shared/external/pencilkit-drawing/evals/evals.json +25 -21
  132. package/pipeline/skills/shared/external/pencilkit-drawing/references/pencilkit-patterns.md +161 -226
  133. package/pipeline/skills/shared/external/permissionkit/SKILL.md +282 -400
  134. package/pipeline/skills/shared/external/permissionkit/evals/evals.json +27 -30
  135. package/pipeline/skills/shared/external/permissionkit/references/permissionkit-patterns.md +237 -350
  136. package/pipeline/skills/shared/external/photos-camera-media/SKILL.md +276 -325
  137. package/pipeline/skills/shared/external/photos-camera-media/references/av-playback.md +299 -545
  138. package/pipeline/skills/shared/external/photos-camera-media/references/camera-capture.md +344 -588
  139. package/pipeline/skills/shared/external/photos-camera-media/references/image-loading-caching.md +316 -660
  140. package/pipeline/skills/shared/external/photos-camera-media/references/photokit-patterns.md +270 -416
  141. package/pipeline/skills/shared/external/push-notifications/SKILL.md +312 -340
  142. package/pipeline/skills/shared/external/push-notifications/evals/evals.json +27 -26
  143. package/pipeline/skills/shared/external/push-notifications/references/notification-patterns.md +328 -485
  144. package/pipeline/skills/shared/external/push-notifications/references/rich-notifications.md +327 -560
  145. package/pipeline/skills/shared/external/realitykit-ar/SKILL.md +218 -410
  146. package/pipeline/skills/shared/external/realitykit-ar/evals/evals.json +24 -27
  147. package/pipeline/skills/shared/external/realitykit-ar/references/realitykit-patterns.md +221 -348
  148. package/pipeline/skills/shared/external/shareplay-activities/SKILL.md +222 -393
  149. package/pipeline/skills/shared/external/shareplay-activities/evals/evals.json +23 -24
  150. package/pipeline/skills/shared/external/shareplay-activities/references/shareplay-patterns.md +280 -420
  151. package/pipeline/skills/shared/external/speech-recognition/SKILL.md +217 -421
  152. package/pipeline/skills/shared/external/speech-recognition/evals/evals.json +23 -26
  153. package/pipeline/skills/shared/external/speech-recognition/references/speechanalyzer-patterns.md +133 -125
  154. package/pipeline/skills/shared/external/storekit/SKILL.md +228 -204
  155. package/pipeline/skills/shared/external/storekit/evals/evals.json +27 -24
  156. package/pipeline/skills/shared/external/storekit/references/app-review-guidelines.md +98 -109
  157. package/pipeline/skills/shared/external/storekit/references/core-patterns.md +298 -242
  158. package/pipeline/skills/shared/external/storekit/references/storekit-advanced.md +356 -649
  159. package/pipeline/skills/shared/external/swift-api-design-guidelines/SKILL.md +274 -399
  160. package/pipeline/skills/shared/external/swift-api-design-guidelines/evals/evals.json +22 -24
  161. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/argument-labels-and-parameters.md +107 -108
  162. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/conventions-and-special-rules.md +93 -165
  163. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/naming-and-clarity.md +99 -137
  164. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/side-effects-and-mutating-pairs.md +77 -120
  165. package/pipeline/skills/shared/external/swift-architecture/SKILL.md +334 -350
  166. package/pipeline/skills/shared/external/swift-architecture/evals/evals.json +22 -22
  167. package/pipeline/skills/shared/external/swift-charts/SKILL.md +208 -394
  168. package/pipeline/skills/shared/external/swift-charts/evals/evals.json +27 -30
  169. package/pipeline/skills/shared/external/swift-charts/references/charts-patterns.md +351 -762
  170. package/pipeline/skills/shared/external/swift-codable/SKILL.md +339 -343
  171. package/pipeline/skills/shared/external/swift-codable/evals/evals.json +20 -20
  172. package/pipeline/skills/shared/external/swift-concurrency/SKILL.md +303 -351
  173. package/pipeline/skills/shared/external/swift-concurrency/evals/evals.json +27 -24
  174. package/pipeline/skills/shared/external/swift-concurrency/references/approachable-concurrency.md +65 -80
  175. package/pipeline/skills/shared/external/swift-concurrency/references/async-algorithms.md +48 -84
  176. package/pipeline/skills/shared/external/swift-concurrency/references/bridging-interop.md +134 -79
  177. package/pipeline/skills/shared/external/swift-concurrency/references/concurrency-patterns.md +145 -167
  178. package/pipeline/skills/shared/external/swift-concurrency/references/diagnostics.md +62 -50
  179. package/pipeline/skills/shared/external/swift-concurrency/references/swiftui-concurrency.md +92 -121
  180. package/pipeline/skills/shared/external/swift-concurrency/references/synchronization-primitives.md +177 -241
  181. package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +258 -234
  182. package/pipeline/skills/shared/external/swift-language/SKILL.md +342 -382
  183. package/pipeline/skills/shared/external/swift-language/evals/evals.json +24 -27
  184. package/pipeline/skills/shared/external/swift-language/references/swift-attributes-interop.md +79 -56
  185. package/pipeline/skills/shared/external/swift-language/references/swift-patterns-extended.md +297 -340
  186. package/pipeline/skills/shared/external/swift-security/SKILL.md +180 -161
  187. package/pipeline/skills/shared/external/swift-security/evals/evals.json +25 -25
  188. package/pipeline/skills/shared/external/swift-security/references/biometric-authentication.md +314 -469
  189. package/pipeline/skills/shared/external/swift-security/references/certificate-trust.md +408 -476
  190. package/pipeline/skills/shared/external/swift-security/references/common-anti-patterns.md +260 -530
  191. package/pipeline/skills/shared/external/swift-security/references/compliance-owasp-mapping.md +270 -477
  192. package/pipeline/skills/shared/external/swift-security/references/credential-storage-patterns.md +573 -571
  193. package/pipeline/skills/shared/external/swift-security/references/cryptokit-public-key.md +370 -441
  194. package/pipeline/skills/shared/external/swift-security/references/cryptokit-symmetric.md +332 -433
  195. package/pipeline/skills/shared/external/swift-security/references/keychain-access-control.md +346 -468
  196. package/pipeline/skills/shared/external/swift-security/references/keychain-fundamentals.md +352 -472
  197. package/pipeline/skills/shared/external/swift-security/references/keychain-item-classes.md +431 -432
  198. package/pipeline/skills/shared/external/swift-security/references/keychain-sharing.md +328 -425
  199. package/pipeline/skills/shared/external/swift-security/references/migration-legacy-stores.md +341 -579
  200. package/pipeline/skills/shared/external/swift-security/references/secure-enclave.md +396 -457
  201. package/pipeline/skills/shared/external/swift-security/references/testing-security-code.md +354 -614
  202. package/pipeline/skills/shared/external/swift-testing/SKILL.md +188 -175
  203. package/pipeline/skills/shared/external/swift-testing/evals/evals.json +26 -24
  204. package/pipeline/skills/shared/external/swift-testing/references/testing-advanced.md +80 -84
  205. package/pipeline/skills/shared/external/swift-testing/references/testing-patterns.md +317 -433
  206. package/pipeline/skills/shared/external/swiftdata/SKILL.md +392 -256
  207. package/pipeline/skills/shared/external/swiftdata/evals/evals.json +24 -24
  208. package/pipeline/skills/shared/external/swiftdata/references/core-data-coexistence.md +206 -402
  209. package/pipeline/skills/shared/external/swiftdata/references/indexing.md +59 -52
  210. package/pipeline/skills/shared/external/swiftdata/references/predicate-pitfalls.md +57 -33
  211. package/pipeline/skills/shared/external/swiftdata/references/swiftdata-advanced.md +354 -747
  212. package/pipeline/skills/shared/external/swiftdata/references/swiftdata-queries.md +300 -508
  213. package/pipeline/skills/shared/external/swiftlint/SKILL.md +175 -226
  214. package/pipeline/skills/shared/external/swiftlint/references/adoption-and-configuration.md +141 -208
  215. package/pipeline/skills/shared/external/swiftlint/references/custom-rules-and-analyze.md +100 -109
  216. package/pipeline/skills/shared/external/swiftlint/references/plugins-run-scripts-and-integrations.md +159 -179
  217. package/pipeline/skills/shared/external/swiftlint/references/rule-reference.md +383 -18
  218. package/pipeline/skills/shared/external/swiftlint/references/rules-suppressions-and-baselines.md +143 -229
  219. package/pipeline/skills/shared/external/swiftui-animation/SKILL.md +283 -366
  220. package/pipeline/skills/shared/external/swiftui-animation/references/animation-advanced.md +396 -608
  221. package/pipeline/skills/shared/external/swiftui-animation/references/core-animation-bridge.md +336 -385
  222. package/pipeline/skills/shared/external/swiftui-gestures/SKILL.md +239 -349
  223. package/pipeline/skills/shared/external/swiftui-gestures/references/gesture-patterns.md +228 -310
  224. package/pipeline/skills/shared/external/swiftui-layout-components/SKILL.md +260 -249
  225. package/pipeline/skills/shared/external/swiftui-layout-components/references/form.md +92 -74
  226. package/pipeline/skills/shared/external/swiftui-layout-components/references/grids.md +112 -177
  227. package/pipeline/skills/shared/external/swiftui-layout-components/references/list.md +61 -64
  228. package/pipeline/skills/shared/external/swiftui-layout-components/references/scrollview.md +94 -134
  229. package/pipeline/skills/shared/external/swiftui-liquid-glass/SKILL.md +193 -225
  230. package/pipeline/skills/shared/external/swiftui-liquid-glass/references/liquid-glass.md +173 -327
  231. package/pipeline/skills/shared/external/swiftui-navigation/SKILL.md +193 -168
  232. package/pipeline/skills/shared/external/swiftui-navigation/references/deeplinks.md +127 -150
  233. package/pipeline/skills/shared/external/swiftui-navigation/references/navigationstack.md +132 -133
  234. package/pipeline/skills/shared/external/swiftui-navigation/references/sheets.md +152 -117
  235. package/pipeline/skills/shared/external/swiftui-navigation/references/tabview.md +106 -140
  236. package/pipeline/skills/shared/external/swiftui-patterns/SKILL.md +316 -252
  237. package/pipeline/skills/shared/external/swiftui-patterns/references/architecture-patterns.md +341 -332
  238. package/pipeline/skills/shared/external/swiftui-patterns/references/deprecated-migration.md +547 -854
  239. package/pipeline/skills/shared/external/swiftui-patterns/references/design-polish.md +485 -537
  240. package/pipeline/skills/shared/external/swiftui-patterns/references/platform-and-sharing.md +417 -499
  241. package/pipeline/skills/shared/external/swiftui-performance/SKILL.md +213 -376
  242. package/pipeline/skills/shared/external/swiftui-performance/references/demystify-swiftui-performance-wwdc23.md +86 -175
  243. package/pipeline/skills/shared/external/swiftui-performance/references/optimizing-swiftui-performance-instruments.md +89 -195
  244. package/pipeline/skills/shared/external/swiftui-performance/references/understanding-hangs-in-your-app.md +95 -182
  245. package/pipeline/skills/shared/external/swiftui-performance/references/understanding-improving-swiftui-performance.md +71 -149
  246. package/pipeline/skills/shared/external/swiftui-performance/references/wwdc-session-sources.md +21 -27
  247. package/pipeline/skills/shared/external/swiftui-uikit-interop/SKILL.md +303 -295
  248. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/hosting-migration.md +204 -387
  249. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/representable-recipes.md +469 -683
  250. package/pipeline/skills/shared/external/swiftui-webkit/SKILL.md +140 -186
  251. package/pipeline/skills/shared/external/swiftui-webkit/references/loading-and-observation.md +75 -86
  252. package/pipeline/skills/shared/external/swiftui-webkit/references/local-content-and-custom-schemes.md +63 -60
  253. package/pipeline/skills/shared/external/swiftui-webkit/references/migration-and-fallbacks.md +69 -137
  254. package/pipeline/skills/shared/external/swiftui-webkit/references/navigation-and-javascript.md +95 -67
  255. package/pipeline/skills/shared/external/tipkit/SKILL.md +220 -335
  256. package/pipeline/skills/shared/external/tipkit/references/tipkit-patterns.md +356 -494
  257. package/pipeline/skills/shared/external/vision-framework/SKILL.md +260 -375
  258. package/pipeline/skills/shared/external/vision-framework/references/vision-requests.md +393 -515
  259. package/pipeline/skills/shared/external/vision-framework/references/visionkit-scanner.md +363 -539
  260. package/pipeline/skills/shared/external/weatherkit/SKILL.md +152 -310
  261. package/pipeline/skills/shared/external/weatherkit/references/weatherkit-patterns.md +288 -407
  262. package/pipeline/skills/shared/external/widgetkit/SKILL.md +216 -288
  263. package/pipeline/skills/shared/external/widgetkit/references/widgetkit-advanced.md +414 -719
  264. package/pipeline/skills/shared/external/NOTICE-swift-ios-skills.md +0 -39
@@ -3,42 +3,45 @@
3
3
  "evals": [
4
4
  {
5
5
  "id": 1,
6
- "prompt": "Review this iOS 26 calendar integration plan: the app asks for `NSCalendarsUsageDescription`, calls `requestAccess(to: .event)`, requests write-only access, then fetches the user's existing events to avoid conflicts before saving an appointment. The team also wants an Add to Calendar button where the user can edit the event in the system sheet. Give corrected guidance with Swift API names where useful.",
7
- "expected_output": "A review that fixes iOS 17+ calendar authorization, Info.plist keys, write-only read limitations, full-access requirements for fetching, and EventKitUI no-authorization creation.",
6
+ "name": "calendar-access-levels",
7
+ "prompt": "Our event-ticket app targets iOS 16 and later. It calls requestAccess(to: .event) on every launch, only has NSCalendarsUsageDescription in Info.plist, asks for write-only access so it can add concerts, and then checks the user's calendar for clashes. Some people just want to add a concert through the system editor. What should change?",
8
+ "expected_output": "Adds the iOS 17 full-access and write-only keys alongside the legacy key, uses the granular request methods with requestAccess(to:) only in a pre-17 availability branch, explains write-only cannot read or fetch so the clash check needs full access, and notes EKEventEditViewController needs no permission on iOS 17+ but its saved result cannot be inspected.",
8
9
  "files": [],
9
10
  "assertions": [
10
- "States that iOS 17+ direct EventKit access needs `NSCalendarsWriteOnlyAccessUsageDescription` or `NSCalendarsFullAccessUsageDescription`, not only `NSCalendarsUsageDescription`.",
11
- "States that `requestAccess(to: .event)` is only a pre-iOS 17 fallback and should be availability-guarded when supporting older systems.",
12
- "Explains that write-only event access can create events but cannot read calendars or fetch existing events, including app-created events.",
13
- "Requires full calendar access for fetching existing events to detect conflicts.",
14
- "States that `EKEventEditViewController` can let the user create/edit an event without the app requesting calendar authorization, with the limitation that the app cannot inspect the saved result afterward."
11
+ "Adds NSCalendarsFullAccessUsageDescription and NSCalendarsWriteOnlyAccessUsageDescription, not only the legacy key",
12
+ "Uses requestFullAccessToEvents or requestWriteOnlyAccessToEvents on iOS 17+, with requestAccess(to:) only as an availability-guarded fallback",
13
+ "States write-only access cannot read calendars or fetch events",
14
+ "Requires full access for the conflict check",
15
+ "Says EKEventEditViewController works without authorization on iOS 17+ and the app cannot inspect what was saved"
15
16
  ]
16
17
  },
17
18
  {
18
19
  "id": 2,
19
- "prompt": "We need to create reminders when someone enters a job site. The draft code creates an `EKReminder`, assigns a `CLLocation` to `EKStructuredLocation`, adds a blank `EKAlarm()`, skips reminder authorization, and assumes `defaultCalendarForNewReminders()` is always non-nil. What should be fixed?",
20
- "expected_output": "A correction that covers reminder full access, required title/calendar/default-list handling, location-based alarm setup, save behavior, and Core Location privacy only when current location is used.",
20
+ "name": "location-reminder",
21
+ "prompt": "Build a 'remind me when I get to the hardware store' feature. We have the store's coordinates from our own database. Our draft saves an EKReminder straight away without a calendar, puts the coordinate in the notes field, and asks for Always location permission at launch.",
22
+ "expected_output": "Requests full reminders access, checks the default reminder list is not nil and sets title and calendar before saving, builds an EKStructuredLocation with geoLocation and a radius in meters, attaches it to an EKAlarm with proximity .enter, and adds a location usage key only if the app uses the person's current location.",
21
23
  "files": [],
22
24
  "assertions": [
23
- "Requires full reminders access through `requestFullAccessToReminders()` before creating or reading reminders.",
24
- "Checks that `defaultCalendarForNewReminders()` returns a calendar and states that reminder `title` and `calendar` must be set before save.",
25
- "Uses `EKStructuredLocation` with `geoLocation` and a radius in meters for the geofence.",
26
- "Configures an `EKAlarm` with a structured location and `.enter` or `.leave` proximity before adding it to the reminder.",
27
- "Mentions `NSLocationWhenInUseUsageDescription` only if the app accesses the person's current location, not merely for fixed coordinates."
25
+ "Calls requestFullAccessToReminders before creating the reminder",
26
+ "Guards defaultCalendarForNewReminders against nil and sets title and calendar before saving",
27
+ "Creates an EKStructuredLocation with geoLocation and a radius in meters",
28
+ "Adds an EKAlarm with the structured location and a proximity of .enter or .leave",
29
+ "Adds a location usage description and Core Location request only when the person's current location is used"
28
30
  ]
29
31
  },
30
32
  {
31
33
  "id": 3,
32
- "prompt": "A teammate wants to use the push notifications layer for all calendar alerts: every event and reminder should schedule a `UNNotificationRequest`, and EventKit should only store title/start/end dates. Review the boundary and recommend the right approach.",
33
- "expected_output": "A boundary answer that keeps Calendar/Reminders alarms in EventKit, hands app-owned notification workflows to push notifications, and avoids expanding EventKit into APNs guidance.",
34
+ "name": "alarms-vs-app-notifications",
35
+ "prompt": "Our study planner adds exam events to the user's calendar and wants alerts 1 day and 1 hour before. We also want the app itself to send a motivational notification each morning. Do we need notification permission for the calendar alerts, and how should both parts be built?",
36
+ "expected_output": "Uses EKAlarm with relative offsets (or absolute dates) added through addAlarm(_:) for the calendar alerts, mentions structured-location alarms for reminders, routes the app's own morning notification to UNUserNotificationCenter and the push-notifications skill, and does not claim EventKit alarms need notification authorization.",
34
37
  "files": [],
35
38
  "assertions": [
36
- "Recommends `EKAlarm` for Calendar event or Reminders alarms that should live with the calendar/reminder item.",
37
- "Mentions relative or absolute event alarms using `EKAlarm(relativeOffset:)` or `EKAlarm(absoluteDate:)` and `addAlarm(_:)`.",
38
- "Mentions structured-location reminders as an EventKit reminder alarm case when location is part of the reminder.",
39
- "Hands off app-owned local/remote notification delivery to `UNUserNotificationCenter` or the push-notifications skill instead of turning EventKit into APNs guidance.",
40
- "Does not claim EventKit calendar/reminder alarms require push notification authorization from the app."
39
+ "Uses EKAlarm for the exam alerts",
40
+ "Shows relative or absolute alarms added with addAlarm(_:)",
41
+ "Mentions location-based alarms on reminders through EKStructuredLocation",
42
+ "Sends the app-owned morning notification through UNUserNotificationCenter or the push-notifications skill",
43
+ "Does not say EventKit alarms require notification permission"
41
44
  ]
42
45
  }
43
46
  ]
44
- }
47
+ }
@@ -1,376 +1,273 @@
1
- # EventKit Extended Patterns
1
+ # EventKit Patterns
2
2
 
3
- Overflow reference for the `eventkit` skill. Contains advanced patterns that exceed the main skill file's scope.
3
+ Extended recipes for the `eventkit-calendar` skill.
4
4
 
5
- ## Contents
5
+ ## A SwiftUI week view
6
6
 
7
- - [SwiftUI Calendar Integration](#swiftui-calendar-integration)
8
- - [Advanced Predicate Queries](#advanced-predicate-queries)
9
- - [Batch Operations](#batch-operations)
10
- - [Calendar Management](#calendar-management)
11
- - [Reminder Workflows](#reminder-workflows)
12
- - [EventKitUI in SwiftUI](#eventkitui-in-swiftui)
13
- - [Typed Change Notifications](#typed-change-notifications)
14
-
15
- ## SwiftUI Calendar Integration
16
-
17
- Read event data only after full calendar access. Write-only access can create
18
- events but cannot read calendars or events, including events the app created.
19
- When supporting iOS 16 or earlier, availability-guard iOS 17+ access requests
20
- and use `requestAccess(to:)` only on the older path.
21
-
22
- ### Observable Event Manager
7
+ Reading events needs full access. Write-only access cannot read anything,
8
+ including events the app saved itself. If the app still supports iOS 16 or
9
+ earlier, put the iOS 17 request methods behind availability checks.
23
10
 
24
11
  ```swift
25
- import EventKit
26
12
  import SwiftUI
13
+ import EventKit
27
14
 
28
- @Observable
29
- @MainActor
30
- final class CalendarManager {
31
- let eventStore = EKEventStore()
32
- var events: [EKEvent] = []
33
- var authorizationStatus: EKAuthorizationStatus = .notDetermined
34
-
35
- func requestAccess() async {
36
- do {
37
- let granted = try await eventStore.requestFullAccessToEvents()
38
- authorizationStatus = granted ? .fullAccess : .denied
39
- if granted { fetchThisWeekEvents() }
40
- } catch {
41
- authorizationStatus = .denied
15
+ @MainActor @Observable
16
+ final class WeekAgenda {
17
+ private(set) var items: [EKEvent] = []
18
+ private(set) var status = EKEventStore.authorizationStatus(for: .event)
19
+
20
+ @ObservationIgnored private let store = EKEventStore()
21
+ @ObservationIgnored private var changeToken: (any NSObjectProtocol)?
22
+
23
+ func connect() async {
24
+ let granted = (try? await store.requestFullAccessToEvents()) ?? false
25
+ status = granted ? .fullAccess : .denied
26
+ guard granted else { return }
27
+ reload()
28
+ let center = NotificationCenter.default
29
+ changeToken = center.addObserver(forName: .EKEventStoreChanged, object: store, queue: .main) { [weak self] _ in
30
+ Task { @MainActor in self?.reload() }
42
31
  }
43
32
  }
44
33
 
45
- func fetchThisWeekEvents() {
46
- let calendar = Calendar.current
47
- let start = calendar.startOfDay(for: Date())
48
- let end = calendar.date(byAdding: .day, value: 7, to: start)!
49
-
50
- let predicate = eventStore.predicateForEvents(
51
- withStart: start,
52
- end: end,
34
+ func reload() {
35
+ let monday = Calendar.current.startOfDay(for: .now)
36
+ let week = store.predicateForEvents(
37
+ withStart: monday,
38
+ end: monday.addingTimeInterval(7 * 86_400),
53
39
  calendars: nil
54
40
  )
55
- events = eventStore.events(matching: predicate)
56
- .sorted { $0.startDate < $1.startDate }
57
- }
58
-
59
- func observeChanges() {
60
- NotificationCenter.default.addObserver(
61
- forName: .EKEventStoreChanged,
62
- object: eventStore,
63
- queue: .main
64
- ) { [weak self] _ in
65
- self?.fetchThisWeekEvents()
66
- }
41
+ items = store.events(matching: week).sorted { $0.startDate < $1.startDate }
67
42
  }
68
43
  }
69
- ```
70
44
 
71
- ### SwiftUI View with Calendar Events
72
-
73
- ```swift
74
- struct CalendarEventsView: View {
75
- @State private var manager = CalendarManager()
45
+ struct WeekAgendaView: View {
46
+ @State private var agenda = WeekAgenda()
76
47
 
77
48
  var body: some View {
78
- List(manager.events, id: \.eventIdentifier) { event in
79
- VStack(alignment: .leading) {
80
- Text(event.title)
81
- .font(.headline)
49
+ List(agenda.items, id: \.eventIdentifier) { event in
50
+ LabeledContent {
82
51
  Text(event.startDate, style: .date)
83
- .font(.caption)
84
- .foregroundStyle(.secondary)
52
+ } label: {
53
+ Text(event.title)
85
54
  }
86
55
  }
87
- .task {
88
- await manager.requestAccess()
89
- manager.observeChanges()
90
- }
91
56
  .overlay {
92
- if manager.events.isEmpty {
93
- ContentUnavailableView(
94
- "No Events",
95
- systemImage: "calendar",
96
- description: Text("No events this week.")
97
- )
57
+ if agenda.items.isEmpty {
58
+ ContentUnavailableView("Nothing This Week", systemImage: "calendar")
98
59
  }
99
60
  }
61
+ .task { await agenda.connect() }
100
62
  }
101
63
  }
102
64
  ```
103
65
 
104
- ## Advanced Predicate Queries
66
+ ## Queries
105
67
 
106
- Event predicates search at most a four-year span. `events(matching:)` and
107
- `enumerateEvents(matching:using:)` are synchronous and include only committed
108
- events, so commit batched changes before querying and move large reads off the
109
- main actor when needed.
68
+ Keep these limits in mind:
110
69
 
111
- ### Events in a Specific Calendar
70
+ - A predicate covers at most four years.
71
+ - Fetches are synchronous and see only committed data, so commit a batch
72
+ before querying it.
73
+ - Large reads block the caller; run them away from the main actor.
74
+
75
+ ### One calendar, one interval
112
76
 
113
77
  ```swift
114
- func fetchEvents(in calendar: EKCalendar, range: DateInterval) -> [EKEvent] {
115
- let predicate = eventStore.predicateForEvents(
116
- withStart: range.start,
117
- end: range.end,
118
- calendars: [calendar]
119
- )
120
- return eventStore.events(matching: predicate)
78
+ func events(in calendar: EKCalendar, during span: DateInterval) -> [EKEvent] {
79
+ let query = store.predicateForEvents(withStart: span.start, end: span.end, calendars: [calendar])
80
+ return store.events(matching: query)
121
81
  }
122
82
  ```
123
83
 
124
- ### Completed Reminders in a Date Range
84
+ ### Completed reminders
85
+
86
+ As in the main skill, only `Sendable` values leave the callback; here that is
87
+ the identifiers.
125
88
 
126
89
  ```swift
127
- func fetchCompletedReminders(from start: Date, to end: Date) async -> [EKReminder] {
128
- let predicate = eventStore.predicateForCompletedReminders(
129
- withCompletionDateStarting: start,
130
- ending: end,
131
- calendars: nil
90
+ func finishedReminders(since start: Date) async -> [String] {
91
+ let query = store.predicateForCompletedReminders(
92
+ withCompletionDateStarting: start, ending: .now, calendars: nil
132
93
  )
133
-
134
- return await withCheckedContinuation { continuation in
135
- eventStore.fetchReminders(matching: predicate) { reminders in
136
- continuation.resume(returning: reminders ?? [])
94
+ return await withCheckedContinuation { resume in
95
+ store.fetchReminders(matching: query) { found in
96
+ resume.resume(returning: (found ?? []).map(\.calendarItemIdentifier))
137
97
  }
138
98
  }
139
99
  }
140
100
  ```
141
101
 
142
- ### Enumerating Events Efficiently
143
-
144
- For large date ranges, use `enumerateEvents` to process events one at a time
145
- without loading all into memory.
102
+ ### Walking a long range
146
103
 
147
104
  ```swift
148
- func processAllEvents(from start: Date, to end: Date) {
149
- let predicate = eventStore.predicateForEvents(
150
- withStart: start,
151
- end: end,
152
- calendars: nil
153
- )
154
-
155
- eventStore.enumerateEvents(matching: predicate) { event, stop in
156
- // Process each event
157
- if event.title.contains("Cancel") {
158
- stop.pointee = true // Stop enumeration early
159
- }
105
+ var firstClash: EKEvent?
106
+ store.enumerateEvents(matching: query) { event, stop in
107
+ if event.availability == .busy, event.startDate < proposedEnd, event.endDate > proposedStart {
108
+ firstClash = event
109
+ stop.pointee = true
160
110
  }
161
111
  }
162
112
  ```
163
113
 
164
- ## Batch Operations
114
+ `enumerateEvents` hands over one event at a time instead of building an array,
115
+ and setting `stop.pointee = true` ends the walk early.
165
116
 
166
- ### Creating Multiple Events Efficiently
167
-
168
- Use `commit: false` for individual saves, then commit once at the end.
117
+ ## Batches
169
118
 
170
119
  ```swift
171
- func createEvents(from entries: [(String, Date, Date)]) throws {
172
- for (title, start, end) in entries {
173
- let event = EKEvent(eventStore: eventStore)
174
- event.title = title
175
- event.startDate = start
176
- event.endDate = end
177
- event.calendar = eventStore.defaultCalendarForNewEvents
178
- try eventStore.save(event, span: .thisEvent, commit: false)
120
+ func importSessions(_ sessions: [ConferenceSession], into calendar: EKCalendar) throws {
121
+ for session in sessions {
122
+ let event = EKEvent(eventStore: store)
123
+ event.title = session.title
124
+ event.startDate = session.start
125
+ event.endDate = session.end
126
+ event.calendar = calendar
127
+ try store.save(event, span: .thisEvent, commit: false)
179
128
  }
180
- try eventStore.commit()
129
+ try store.commit()
181
130
  }
182
- ```
183
131
 
184
- ### Deleting Events in Bulk
185
-
186
- ```swift
187
- func deleteEvents(_ events: [EKEvent]) throws {
188
- for event in events {
189
- try eventStore.remove(event, span: .thisEvent, commit: false)
132
+ func cancelAll(_ doomed: [EKEvent]) throws {
133
+ for item in doomed {
134
+ try store.remove(item, span: .thisEvent, commit: false)
190
135
  }
191
- try eventStore.commit()
136
+ try store.commit()
192
137
  }
193
138
  ```
194
139
 
195
- ### Resetting Unsaved Changes
196
-
197
- ```swift
198
- // Discard all uncommitted changes
199
- eventStore.reset()
200
- ```
140
+ One `commit()` at the end writes the whole batch. `store.reset()` throws away
141
+ everything not yet committed.
201
142
 
202
- ## Calendar Management
203
-
204
- ### Creating a Custom Calendar
143
+ ## Managing calendars
205
144
 
206
145
  ```swift
207
- func createCalendar(name: String, color: CGColor) throws -> EKCalendar {
208
- let calendar = EKCalendar(for: .event, eventStore: eventStore)
209
- calendar.title = name
210
- calendar.cgColor = color
211
-
212
- // Find a local source (iCloud, local, etc.)
213
- if let localSource = eventStore.sources.first(where: {
214
- $0.sourceType == .local
215
- }) {
216
- calendar.source = localSource
217
- } else if let defaultSource = eventStore.defaultCalendarForNewEvents?.source {
218
- calendar.source = defaultSource
219
- }
220
-
221
- try eventStore.saveCalendar(calendar, commit: true)
222
- return calendar
146
+ func makeTripCalendar() throws -> EKCalendar {
147
+ let trips = EKCalendar(for: .event, eventStore: store)
148
+ trips.title = "Trips"
149
+ trips.cgColor = UIColor.systemTeal.cgColor
150
+ trips.source = store.sources.first { $0.sourceType == .local }
151
+ ?? store.defaultCalendarForNewEvents?.source
152
+ try store.saveCalendar(trips, commit: true)
153
+ return trips
223
154
  }
224
155
  ```
225
156
 
226
- ### Listing Calendars by Type
227
-
228
- ```swift
229
- // All event calendars
230
- let eventCalendars = eventStore.calendars(for: .event)
231
-
232
- // All reminder calendars
233
- let reminderCalendars = eventStore.calendars(for: .reminder)
234
-
235
- // Only writable calendars
236
- let writableCalendars = eventCalendars.filter { $0.allowsContentModifications }
237
- ```
157
+ A local source is preferred; otherwise the new calendar joins the default
158
+ calendar's source. List calendars with `store.calendars(for: .event)` or
159
+ `.reminder`, and keep only those with `allowsContentModifications` when you
160
+ need a writable one.
238
161
 
239
- ## Reminder Workflows
162
+ ## Reminder recipes
240
163
 
241
- ### Reminder with Location-Based Alarm
164
+ ### Location-triggered reminder
242
165
 
243
166
  ```swift
244
- import CoreLocation
245
- import EventKit
246
-
247
- enum CalendarError: Error {
248
- case remindersAccessRequired
249
- case missingDefaultReminderList
250
- }
251
-
252
- func createLocationReminder(
253
- title: String,
254
- latitude: Double,
255
- longitude: Double
256
- ) throws {
257
- guard EKEventStore.authorizationStatus(for: .reminder) == .fullAccess else {
258
- throw CalendarError.remindersAccessRequired
167
+ func remindOnArrival(at place: CLLocation, named title: String) throws {
168
+ let access = EKEventStore.authorizationStatus(for: .reminder)
169
+ guard access == .fullAccess else { throw PlannerError.remindersNotAllowed }
170
+ guard let list = store.defaultCalendarForNewReminders() else {
171
+ throw PlannerError.noReminderList
259
172
  }
260
- guard let reminderCalendar = eventStore.defaultCalendarForNewReminders() else {
261
- throw CalendarError.missingDefaultReminderList
262
- }
263
-
264
- let reminder = EKReminder(eventStore: eventStore)
173
+ let reminder = EKReminder(eventStore: store)
265
174
  reminder.title = title
266
- reminder.calendar = reminderCalendar
175
+ reminder.calendar = list
267
176
 
268
- let location = EKStructuredLocation(title: "Target Location")
269
- location.geoLocation = CLLocation(latitude: latitude, longitude: longitude)
270
- location.radius = 200 // meters
177
+ let spot = EKStructuredLocation(title: "Garden Centre")
178
+ spot.geoLocation = place
179
+ spot.radius = 150
271
180
 
272
- let alarm = EKAlarm(relativeOffset: 0)
273
- alarm.structuredLocation = location
274
- alarm.proximity = .enter // .enter or .leave
275
- reminder.addAlarm(alarm)
181
+ let trigger = EKAlarm(relativeOffset: 0)
182
+ trigger.structuredLocation = spot
183
+ trigger.proximity = .enter
184
+ reminder.addAlarm(trigger)
276
185
 
277
- try eventStore.save(reminder, commit: true)
186
+ try store.save(reminder, commit: true)
278
187
  }
279
188
  ```
280
189
 
281
- If the app uses the person's current location while creating location-based
282
- reminders, add `NSLocationWhenInUseUsageDescription` and request Core Location
283
- authorization in the location layer.
190
+ `radius` is in meters. Use `.leave` instead of `.enter` for departure alerts.
191
+ The reminder needs a title and a calendar before it is saved. Coordinates from your own data need no
192
+ location permission. Only when `place` comes from where the person is right
193
+ now does the app add `NSLocationWhenInUseUsageDescription` and ask Core
194
+ Location.
284
195
 
285
- ### Reminder with Priority
196
+ ### Priority
286
197
 
287
- ```swift
288
- let reminder = EKReminder(eventStore: eventStore)
289
- reminder.title = "Important Task"
290
- reminder.priority = 1 // 1-4: High, 5: Medium, 6-9: Low, 0: None
291
- reminder.calendar = eventStore.defaultCalendarForNewReminders()
292
- ```
293
-
294
- ## EventKitUI in SwiftUI
198
+ | `priority` | Meaning |
199
+ |------------|---------|
200
+ | 0 | None |
201
+ | 1 to 4 | High |
202
+ | 5 | Medium |
203
+ | 6 to 9 | Low |
295
204
 
296
- ### UIViewControllerRepresentable for Event Editor
205
+ ## The event editor in SwiftUI
297
206
 
298
207
  ```swift
299
- import SwiftUI
300
208
  import EventKitUI
301
209
 
302
- struct EventEditView: UIViewControllerRepresentable {
303
- let eventStore: EKEventStore
210
+ struct EventEditorSheet: UIViewControllerRepresentable {
211
+ let store: EKEventStore
304
212
  @Binding var isPresented: Bool
305
213
 
214
+ func makeCoordinator() -> Coordinator { Coordinator(isPresented: $isPresented) }
215
+
306
216
  func makeUIViewController(context: Context) -> EKEventEditViewController {
307
- let editor = EKEventEditViewController()
308
- editor.eventStore = eventStore
309
- editor.editViewDelegate = context.coordinator
310
- return editor
217
+ let sheet = EKEventEditViewController()
218
+ sheet.editViewDelegate = context.coordinator
219
+ sheet.eventStore = store
220
+ return sheet
311
221
  }
312
222
 
313
- func updateUIViewController(
314
- _ uiViewController: EKEventEditViewController,
315
- context: Context
316
- ) {}
223
+ func updateUIViewController(_ sheet: EKEventEditViewController, context: Context) {}
317
224
 
318
- func makeCoordinator() -> Coordinator {
319
- Coordinator(self)
320
- }
321
-
322
- class Coordinator: NSObject, EKEventEditViewDelegate {
323
- let parent: EventEditView
225
+ final class Coordinator: NSObject, EKEventEditViewDelegate {
226
+ @Binding var isPresented: Bool
324
227
 
325
- init(_ parent: EventEditView) {
326
- self.parent = parent
327
- }
228
+ init(isPresented: Binding<Bool>) { _isPresented = isPresented }
328
229
 
329
- func eventEditViewController(
330
- _ controller: EKEventEditViewController,
331
- didCompleteWith action: EKEventEditViewAction
332
- ) {
333
- parent.isPresented = false
230
+ func eventEditViewController(_ sheet: EKEventEditViewController,
231
+ didCompleteWith outcome: EKEventEditViewAction) {
232
+ isPresented = false
334
233
  }
335
234
  }
336
235
  }
337
- ```
338
-
339
- On iOS 17+, the editor can create events without app calendar authorization. It
340
- runs out of process, so the app cannot inspect the dismissed controller to learn
341
- what the person saved unless the app separately has full access and refetches.
342
236
 
343
- ### Usage in SwiftUI
344
-
345
- ```swift
346
- struct CalendarView: View {
347
- @State private var showEditor = false
348
- let eventStore = EKEventStore()
237
+ struct AddToCalendarButton: View {
238
+ let store: EKEventStore
239
+ @State private var editing = false
349
240
 
350
241
  var body: some View {
351
- Button("Add Event") { showEditor = true }
352
- .sheet(isPresented: $showEditor) {
353
- EventEditView(
354
- eventStore: eventStore,
355
- isPresented: $showEditor
356
- )
242
+ Button("Add to Calendar", systemImage: "calendar.badge.plus") { editing = true }
243
+ .sheet(isPresented: $editing) {
244
+ EventEditorSheet(store: store, isPresented: $editing)
357
245
  }
358
246
  }
359
247
  }
360
248
  ```
361
249
 
362
- ## Typed Change Notifications
250
+ From iOS 17 this needs no calendar permission at all: the editor lives in
251
+ another process. The app does not learn what was saved; it can see
252
+ the result only with full access and a fresh fetch.
363
253
 
364
- Use `.EKEventStoreChanged` for broad compatibility. On iOS 26+, the typed
365
- notification message is available when you want Foundation's message API:
254
+ ## Change notifications, old and new
255
+
256
+ `.EKEventStoreChanged` works on every supported version. On iOS 26 the typed
257
+ message can be used through Foundation's message-based observer API:
366
258
 
367
259
  ```swift
368
- if #available(iOS 26.0, *) {
369
- let observation = NotificationCenter.default.addObserver(
370
- of: eventStore,
371
- for: .changed
372
- ) { _ in
373
- fetchThisWeekEvents()
260
+ if #available(iOS 26, *) {
261
+ storeObservation = NotificationCenter.default.addObserver(of: store, for: .changed) { _ in
262
+ agenda.reload()
263
+ }
264
+ } else {
265
+ let center = NotificationCenter.default
266
+ storeObservation = center.addObserver(forName: .EKEventStoreChanged, object: store, queue: nil) { _ in
267
+ Task { @MainActor in agenda.reload() }
374
268
  }
375
269
  }
376
270
  ```
271
+
272
+ Keep the returned token alive for as long as updates are wanted. The two APIs
273
+ return different token types, so `storeObservation` is declared as `Any?`.