@mmerterden/multi-agent-pipeline 20.7.0 → 20.8.1

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 (284) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/LICENSE +0 -10
  3. package/docs/facts.json +1 -1
  4. package/manifest.json +285 -285
  5. package/package.json +3 -3
  6. package/pipeline/lib/redact.mjs +3 -2
  7. package/pipeline/scripts/_notices.mjs +1 -1
  8. package/pipeline/scripts/gen-skills-index.mjs +13 -1
  9. package/pipeline/scripts/pre-commit-check.sh +4 -0
  10. package/pipeline/skills/.skill-manifest.json +69 -69
  11. package/pipeline/skills/shared/README.md +70 -70
  12. package/pipeline/skills/shared/external/alarmkit/SKILL.md +373 -381
  13. package/pipeline/skills/shared/external/alarmkit/evals/evals.json +23 -18
  14. package/pipeline/skills/shared/external/alarmkit/references/alarmkit-patterns.md +328 -378
  15. package/pipeline/skills/shared/external/app-clips/SKILL.md +260 -160
  16. package/pipeline/skills/shared/external/app-clips/evals/evals.json +27 -27
  17. package/pipeline/skills/shared/external/app-clips/references/data-handoff-notifications-location.md +150 -83
  18. package/pipeline/skills/shared/external/app-clips/references/routing-and-experiences.md +135 -83
  19. package/pipeline/skills/shared/external/app-clips/references/size-capabilities-and-promotion.md +143 -85
  20. package/pipeline/skills/shared/external/app-intents/SKILL.md +302 -304
  21. package/pipeline/skills/shared/external/app-intents/evals/evals.json +21 -21
  22. package/pipeline/skills/shared/external/app-intents/references/appintents-advanced.md +594 -894
  23. package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +345 -277
  24. package/pipeline/skills/shared/external/app-store-optimization/evals/evals.json +27 -23
  25. package/pipeline/skills/shared/external/app-store-optimization/references/keyword-research-methodology.md +107 -121
  26. package/pipeline/skills/shared/external/app-store-optimization/references/product-page-variants.md +145 -165
  27. package/pipeline/skills/shared/external/app-store-review/SKILL.md +306 -326
  28. package/pipeline/skills/shared/external/app-store-review/evals/evals.json +21 -21
  29. package/pipeline/skills/shared/external/app-store-review/references/privacy-manifest.md +105 -67
  30. package/pipeline/skills/shared/external/app-store-review/references/review-checklists.md +114 -101
  31. package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +335 -360
  32. package/pipeline/skills/shared/external/apple-on-device-ai/evals/evals.json +24 -27
  33. package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-conversion.md +215 -322
  34. package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-optimization.md +161 -256
  35. package/pipeline/skills/shared/external/apple-on-device-ai/references/foundation-models.md +277 -387
  36. package/pipeline/skills/shared/external/apple-on-device-ai/references/mlx-swift.md +196 -210
  37. package/pipeline/skills/shared/external/authentication/SKILL.md +277 -381
  38. package/pipeline/skills/shared/external/authentication/evals/evals.json +25 -25
  39. package/pipeline/skills/shared/external/authentication/references/keychain-biometric.md +135 -178
  40. package/pipeline/skills/shared/external/authentication/references/passkeys.md +111 -147
  41. package/pipeline/skills/shared/external/avkit/SKILL.md +267 -364
  42. package/pipeline/skills/shared/external/avkit/evals/evals.json +26 -26
  43. package/pipeline/skills/shared/external/avkit/references/avkit-patterns.md +375 -493
  44. package/pipeline/skills/shared/external/background-processing/SKILL.md +274 -384
  45. package/pipeline/skills/shared/external/background-processing/evals/evals.json +22 -22
  46. package/pipeline/skills/shared/external/background-processing/references/background-task-patterns.md +173 -321
  47. package/pipeline/skills/shared/external/callkit-voip/SKILL.md +290 -371
  48. package/pipeline/skills/shared/external/callkit-voip/evals/evals.json +24 -24
  49. package/pipeline/skills/shared/external/callkit-voip/references/callkit-patterns.md +175 -343
  50. package/pipeline/skills/shared/external/cloudkit-sync/SKILL.md +292 -381
  51. package/pipeline/skills/shared/external/cloudkit-sync/evals/evals.json +33 -30
  52. package/pipeline/skills/shared/external/cloudkit-sync/references/cloudkit-patterns.md +227 -355
  53. package/pipeline/skills/shared/external/contacts-framework/SKILL.md +197 -346
  54. package/pipeline/skills/shared/external/contacts-framework/evals/evals.json +19 -21
  55. package/pipeline/skills/shared/external/contacts-framework/references/contacts-patterns.md +169 -308
  56. package/pipeline/skills/shared/external/core-bluetooth/SKILL.md +228 -376
  57. package/pipeline/skills/shared/external/core-bluetooth/evals/evals.json +25 -22
  58. package/pipeline/skills/shared/external/core-bluetooth/references/ble-patterns.md +257 -337
  59. package/pipeline/skills/shared/external/core-data/SKILL.md +302 -368
  60. package/pipeline/skills/shared/external/core-data/evals/evals.json +30 -27
  61. package/pipeline/skills/shared/external/core-motion/SKILL.md +235 -324
  62. package/pipeline/skills/shared/external/core-motion/evals/evals.json +31 -27
  63. package/pipeline/skills/shared/external/core-motion/references/motion-patterns.md +210 -310
  64. package/pipeline/skills/shared/external/core-nfc/SKILL.md +292 -366
  65. package/pipeline/skills/shared/external/core-nfc/evals/evals.json +22 -24
  66. package/pipeline/skills/shared/external/core-nfc/references/nfc-patterns.md +233 -329
  67. package/pipeline/skills/shared/external/coreml/SKILL.md +323 -367
  68. package/pipeline/skills/shared/external/coreml/evals/evals.json +24 -21
  69. package/pipeline/skills/shared/external/coreml/references/coreml-swift-integration.md +562 -565
  70. package/pipeline/skills/shared/external/cryptokit/SKILL.md +253 -394
  71. package/pipeline/skills/shared/external/cryptokit/evals/evals.json +20 -18
  72. package/pipeline/skills/shared/external/cryptokit/references/cryptokit-patterns.md +299 -488
  73. package/pipeline/skills/shared/external/debugging-instruments/SKILL.md +270 -323
  74. package/pipeline/skills/shared/external/debugging-instruments/evals/evals.json +27 -30
  75. package/pipeline/skills/shared/external/debugging-instruments/references/instruments-guide.md +167 -315
  76. package/pipeline/skills/shared/external/debugging-instruments/references/lldb-patterns.md +140 -193
  77. package/pipeline/skills/shared/external/device-integrity/SKILL.md +236 -353
  78. package/pipeline/skills/shared/external/device-integrity/evals/evals.json +25 -21
  79. package/pipeline/skills/shared/external/device-integrity/references/device-integrity-patterns.md +159 -197
  80. package/pipeline/skills/shared/external/energykit/SKILL.md +225 -392
  81. package/pipeline/skills/shared/external/energykit/evals/evals.json +29 -28
  82. package/pipeline/skills/shared/external/energykit/references/energykit-patterns.md +174 -470
  83. package/pipeline/skills/shared/external/eventkit-calendar/SKILL.md +261 -383
  84. package/pipeline/skills/shared/external/eventkit-calendar/evals/evals.json +25 -22
  85. package/pipeline/skills/shared/external/eventkit-calendar/references/eventkit-patterns.md +165 -268
  86. package/pipeline/skills/shared/external/healthkit/SKILL.md +252 -303
  87. package/pipeline/skills/shared/external/healthkit/evals/evals.json +24 -23
  88. package/pipeline/skills/shared/external/healthkit/references/healthkit-patterns.md +369 -523
  89. package/pipeline/skills/shared/external/homekit-matter/SKILL.md +233 -348
  90. package/pipeline/skills/shared/external/homekit-matter/evals/evals.json +27 -22
  91. package/pipeline/skills/shared/external/homekit-matter/references/matter-commissioning.md +199 -305
  92. package/pipeline/skills/shared/external/ios-accessibility/SKILL.md +368 -340
  93. package/pipeline/skills/shared/external/ios-accessibility/evals/evals.json +28 -27
  94. package/pipeline/skills/shared/external/ios-accessibility/references/a11y-patterns.md +314 -260
  95. package/pipeline/skills/shared/external/ios-accessibility/references/media-accessibility.md +97 -67
  96. package/pipeline/skills/shared/external/ios-accessibility/references/nutrition-labels.md +165 -101
  97. package/pipeline/skills/shared/external/ios-localization/SKILL.md +258 -371
  98. package/pipeline/skills/shared/external/ios-localization/evals/evals.json +23 -23
  99. package/pipeline/skills/shared/external/ios-localization/references/formatstyle-locale.md +283 -491
  100. package/pipeline/skills/shared/external/ios-localization/references/string-catalogs.md +313 -440
  101. package/pipeline/skills/shared/external/ios-networking/SKILL.md +265 -341
  102. package/pipeline/skills/shared/external/ios-networking/evals/evals.json +24 -24
  103. package/pipeline/skills/shared/external/ios-networking/references/background-websocket.md +425 -652
  104. package/pipeline/skills/shared/external/ios-networking/references/file-storage-patterns.md +143 -285
  105. package/pipeline/skills/shared/external/ios-networking/references/lightweight-clients.md +93 -53
  106. package/pipeline/skills/shared/external/ios-networking/references/network-framework.md +231 -456
  107. package/pipeline/skills/shared/external/ios-networking/references/urlsession-patterns.md +517 -784
  108. package/pipeline/skills/shared/external/ios-simulator/SKILL.md +265 -393
  109. package/pipeline/skills/shared/external/ios-simulator/evals/evals.json +21 -21
  110. package/pipeline/skills/shared/external/ios-simulator/references/simctl-commands.md +177 -270
  111. package/pipeline/skills/shared/external/live-activities/SKILL.md +318 -360
  112. package/pipeline/skills/shared/external/live-activities/evals/evals.json +21 -21
  113. package/pipeline/skills/shared/external/live-activities/references/activitykit-patterns.md +478 -710
  114. package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +3 -3
  115. package/pipeline/skills/shared/external/localization-reuse-map/example-mapping.json +1 -1
  116. package/pipeline/skills/shared/external/localization-reuse-map/reference/format-and-output.md +8 -7
  117. package/pipeline/skills/shared/external/localization-reuse-map/reference/publish-and-snapshot.md +2 -2
  118. package/pipeline/skills/shared/external/localization-reuse-map/reference/sources-and-recipes.md +5 -2
  119. package/pipeline/skills/shared/external/localization-reuse-map/scripts/_shared.py +100 -0
  120. package/pipeline/skills/shared/external/localization-reuse-map/scripts/build-artifact.py +45 -26
  121. package/pipeline/skills/shared/external/localization-reuse-map/scripts/build-spreadsheet.py +14 -16
  122. package/pipeline/skills/shared/external/localization-reuse-map/scripts/fetch-annotations.py +12 -5
  123. package/pipeline/skills/shared/external/localization-reuse-map/scripts/fetch-legacy-labels.py +2 -1
  124. package/pipeline/skills/shared/external/localization-reuse-map/scripts/publish-confluence.py +6 -5
  125. package/pipeline/skills/shared/external/localization-reuse-map/scripts/render-overlay.py +44 -18
  126. package/pipeline/skills/shared/external/localization-reuse-map/scripts/resolve-legacy-values.py +5 -2
  127. package/pipeline/skills/shared/external/localization-reuse-map/scripts/resolve-new-values.py +10 -11
  128. package/pipeline/skills/shared/external/localization-reuse-map/scripts/scan-screen-keys.py +4 -33
  129. package/pipeline/skills/shared/external/localization-reuse-map/scripts/verify-map.py +12 -59
  130. package/pipeline/skills/shared/external/mapkit-location/SKILL.md +297 -267
  131. package/pipeline/skills/shared/external/mapkit-location/evals/evals.json +28 -24
  132. package/pipeline/skills/shared/external/mapkit-location/references/mapkit-corelocation-patterns.md +378 -532
  133. package/pipeline/skills/shared/external/mapkit-location/references/mapkit-patterns.md +397 -499
  134. package/pipeline/skills/shared/external/metrickit-diagnostics/SKILL.md +165 -348
  135. package/pipeline/skills/shared/external/metrickit-diagnostics/evals/evals.json +26 -23
  136. package/pipeline/skills/shared/external/metrickit-diagnostics/references/metrickit-patterns.md +123 -130
  137. package/pipeline/skills/shared/external/musickit-audio/SKILL.md +189 -315
  138. package/pipeline/skills/shared/external/musickit-audio/evals/evals.json +22 -21
  139. package/pipeline/skills/shared/external/musickit-audio/references/musickit-patterns.md +181 -270
  140. package/pipeline/skills/shared/external/natural-language/SKILL.md +188 -340
  141. package/pipeline/skills/shared/external/natural-language/evals/evals.json +21 -21
  142. package/pipeline/skills/shared/external/natural-language/references/translation-patterns.md +171 -225
  143. package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +258 -392
  144. package/pipeline/skills/shared/external/passkit-wallet/evals/evals.json +30 -29
  145. package/pipeline/skills/shared/external/passkit-wallet/references/wallet-passes.md +164 -231
  146. package/pipeline/skills/shared/external/pdfkit/SKILL.md +312 -344
  147. package/pipeline/skills/shared/external/pdfkit/evals/evals.json +19 -19
  148. package/pipeline/skills/shared/external/pdfkit/references/pdfkit-patterns.md +413 -624
  149. package/pipeline/skills/shared/external/pencilkit-drawing/SKILL.md +242 -358
  150. package/pipeline/skills/shared/external/pencilkit-drawing/evals/evals.json +25 -21
  151. package/pipeline/skills/shared/external/pencilkit-drawing/references/pencilkit-patterns.md +161 -226
  152. package/pipeline/skills/shared/external/permissionkit/SKILL.md +282 -400
  153. package/pipeline/skills/shared/external/permissionkit/evals/evals.json +27 -30
  154. package/pipeline/skills/shared/external/permissionkit/references/permissionkit-patterns.md +237 -350
  155. package/pipeline/skills/shared/external/photos-camera-media/SKILL.md +276 -325
  156. package/pipeline/skills/shared/external/photos-camera-media/references/av-playback.md +299 -545
  157. package/pipeline/skills/shared/external/photos-camera-media/references/camera-capture.md +344 -588
  158. package/pipeline/skills/shared/external/photos-camera-media/references/image-loading-caching.md +316 -660
  159. package/pipeline/skills/shared/external/photos-camera-media/references/photokit-patterns.md +270 -416
  160. package/pipeline/skills/shared/external/push-notifications/SKILL.md +312 -340
  161. package/pipeline/skills/shared/external/push-notifications/evals/evals.json +27 -26
  162. package/pipeline/skills/shared/external/push-notifications/references/notification-patterns.md +328 -485
  163. package/pipeline/skills/shared/external/push-notifications/references/rich-notifications.md +327 -560
  164. package/pipeline/skills/shared/external/realitykit-ar/SKILL.md +218 -410
  165. package/pipeline/skills/shared/external/realitykit-ar/evals/evals.json +24 -27
  166. package/pipeline/skills/shared/external/realitykit-ar/references/realitykit-patterns.md +221 -348
  167. package/pipeline/skills/shared/external/shareplay-activities/SKILL.md +222 -393
  168. package/pipeline/skills/shared/external/shareplay-activities/evals/evals.json +23 -24
  169. package/pipeline/skills/shared/external/shareplay-activities/references/shareplay-patterns.md +280 -420
  170. package/pipeline/skills/shared/external/skill-creator/template.md +7 -1
  171. package/pipeline/skills/shared/external/speech-recognition/SKILL.md +217 -421
  172. package/pipeline/skills/shared/external/speech-recognition/evals/evals.json +23 -26
  173. package/pipeline/skills/shared/external/speech-recognition/references/speechanalyzer-patterns.md +133 -125
  174. package/pipeline/skills/shared/external/storekit/SKILL.md +228 -204
  175. package/pipeline/skills/shared/external/storekit/evals/evals.json +27 -24
  176. package/pipeline/skills/shared/external/storekit/references/app-review-guidelines.md +98 -109
  177. package/pipeline/skills/shared/external/storekit/references/core-patterns.md +302 -241
  178. package/pipeline/skills/shared/external/storekit/references/storekit-advanced.md +356 -649
  179. package/pipeline/skills/shared/external/swift-api-design-guidelines/SKILL.md +274 -399
  180. package/pipeline/skills/shared/external/swift-api-design-guidelines/evals/evals.json +22 -24
  181. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/argument-labels-and-parameters.md +107 -108
  182. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/conventions-and-special-rules.md +93 -165
  183. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/naming-and-clarity.md +99 -137
  184. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/side-effects-and-mutating-pairs.md +77 -120
  185. package/pipeline/skills/shared/external/swift-architecture/SKILL.md +334 -350
  186. package/pipeline/skills/shared/external/swift-architecture/evals/evals.json +22 -22
  187. package/pipeline/skills/shared/external/swift-charts/SKILL.md +208 -394
  188. package/pipeline/skills/shared/external/swift-charts/evals/evals.json +27 -30
  189. package/pipeline/skills/shared/external/swift-charts/references/charts-patterns.md +351 -762
  190. package/pipeline/skills/shared/external/swift-codable/SKILL.md +339 -343
  191. package/pipeline/skills/shared/external/swift-codable/evals/evals.json +20 -20
  192. package/pipeline/skills/shared/external/swift-concurrency/SKILL.md +304 -351
  193. package/pipeline/skills/shared/external/swift-concurrency/evals/evals.json +27 -24
  194. package/pipeline/skills/shared/external/swift-concurrency/references/approachable-concurrency.md +65 -80
  195. package/pipeline/skills/shared/external/swift-concurrency/references/async-algorithms.md +48 -84
  196. package/pipeline/skills/shared/external/swift-concurrency/references/bridging-interop.md +134 -79
  197. package/pipeline/skills/shared/external/swift-concurrency/references/concurrency-patterns.md +145 -167
  198. package/pipeline/skills/shared/external/swift-concurrency/references/diagnostics.md +62 -50
  199. package/pipeline/skills/shared/external/swift-concurrency/references/swiftui-concurrency.md +92 -121
  200. package/pipeline/skills/shared/external/swift-concurrency/references/synchronization-primitives.md +177 -241
  201. package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +258 -234
  202. package/pipeline/skills/shared/external/swift-language/SKILL.md +342 -382
  203. package/pipeline/skills/shared/external/swift-language/evals/evals.json +24 -27
  204. package/pipeline/skills/shared/external/swift-language/references/swift-attributes-interop.md +79 -56
  205. package/pipeline/skills/shared/external/swift-language/references/swift-patterns-extended.md +297 -340
  206. package/pipeline/skills/shared/external/swift-security/SKILL.md +183 -162
  207. package/pipeline/skills/shared/external/swift-security/evals/evals.json +25 -25
  208. package/pipeline/skills/shared/external/swift-security/references/biometric-authentication.md +314 -469
  209. package/pipeline/skills/shared/external/swift-security/references/certificate-trust.md +411 -476
  210. package/pipeline/skills/shared/external/swift-security/references/common-anti-patterns.md +260 -530
  211. package/pipeline/skills/shared/external/swift-security/references/compliance-owasp-mapping.md +270 -477
  212. package/pipeline/skills/shared/external/swift-security/references/credential-storage-patterns.md +573 -571
  213. package/pipeline/skills/shared/external/swift-security/references/cryptokit-public-key.md +370 -441
  214. package/pipeline/skills/shared/external/swift-security/references/cryptokit-symmetric.md +332 -433
  215. package/pipeline/skills/shared/external/swift-security/references/keychain-access-control.md +346 -468
  216. package/pipeline/skills/shared/external/swift-security/references/keychain-fundamentals.md +375 -491
  217. package/pipeline/skills/shared/external/swift-security/references/keychain-item-classes.md +431 -432
  218. package/pipeline/skills/shared/external/swift-security/references/keychain-sharing.md +328 -425
  219. package/pipeline/skills/shared/external/swift-security/references/migration-legacy-stores.md +341 -579
  220. package/pipeline/skills/shared/external/swift-security/references/secure-enclave.md +397 -457
  221. package/pipeline/skills/shared/external/swift-security/references/testing-security-code.md +354 -614
  222. package/pipeline/skills/shared/external/swift-testing/SKILL.md +191 -175
  223. package/pipeline/skills/shared/external/swift-testing/evals/evals.json +26 -24
  224. package/pipeline/skills/shared/external/swift-testing/references/testing-advanced.md +81 -84
  225. package/pipeline/skills/shared/external/swift-testing/references/testing-patterns.md +317 -433
  226. package/pipeline/skills/shared/external/swiftdata/SKILL.md +394 -256
  227. package/pipeline/skills/shared/external/swiftdata/evals/evals.json +24 -24
  228. package/pipeline/skills/shared/external/swiftdata/references/core-data-coexistence.md +206 -402
  229. package/pipeline/skills/shared/external/swiftdata/references/indexing.md +59 -52
  230. package/pipeline/skills/shared/external/swiftdata/references/predicate-pitfalls.md +57 -33
  231. package/pipeline/skills/shared/external/swiftdata/references/swiftdata-advanced.md +354 -747
  232. package/pipeline/skills/shared/external/swiftdata/references/swiftdata-queries.md +300 -508
  233. package/pipeline/skills/shared/external/swiftlint/SKILL.md +175 -226
  234. package/pipeline/skills/shared/external/swiftlint/references/adoption-and-configuration.md +141 -208
  235. package/pipeline/skills/shared/external/swiftlint/references/custom-rules-and-analyze.md +100 -109
  236. package/pipeline/skills/shared/external/swiftlint/references/plugins-run-scripts-and-integrations.md +159 -179
  237. package/pipeline/skills/shared/external/swiftlint/references/rule-reference.md +383 -18
  238. package/pipeline/skills/shared/external/swiftlint/references/rules-suppressions-and-baselines.md +143 -229
  239. package/pipeline/skills/shared/external/swiftui-animation/SKILL.md +283 -366
  240. package/pipeline/skills/shared/external/swiftui-animation/references/animation-advanced.md +396 -608
  241. package/pipeline/skills/shared/external/swiftui-animation/references/core-animation-bridge.md +336 -385
  242. package/pipeline/skills/shared/external/swiftui-gestures/SKILL.md +239 -349
  243. package/pipeline/skills/shared/external/swiftui-gestures/references/gesture-patterns.md +228 -310
  244. package/pipeline/skills/shared/external/swiftui-layout-components/SKILL.md +260 -249
  245. package/pipeline/skills/shared/external/swiftui-layout-components/references/form.md +92 -74
  246. package/pipeline/skills/shared/external/swiftui-layout-components/references/grids.md +112 -177
  247. package/pipeline/skills/shared/external/swiftui-layout-components/references/list.md +61 -64
  248. package/pipeline/skills/shared/external/swiftui-layout-components/references/scrollview.md +94 -134
  249. package/pipeline/skills/shared/external/swiftui-liquid-glass/SKILL.md +193 -225
  250. package/pipeline/skills/shared/external/swiftui-liquid-glass/references/liquid-glass.md +173 -327
  251. package/pipeline/skills/shared/external/swiftui-navigation/SKILL.md +201 -168
  252. package/pipeline/skills/shared/external/swiftui-navigation/references/deeplinks.md +127 -150
  253. package/pipeline/skills/shared/external/swiftui-navigation/references/navigationstack.md +134 -133
  254. package/pipeline/skills/shared/external/swiftui-navigation/references/sheets.md +152 -117
  255. package/pipeline/skills/shared/external/swiftui-navigation/references/tabview.md +111 -138
  256. package/pipeline/skills/shared/external/swiftui-patterns/SKILL.md +316 -252
  257. package/pipeline/skills/shared/external/swiftui-patterns/references/architecture-patterns.md +341 -332
  258. package/pipeline/skills/shared/external/swiftui-patterns/references/deprecated-migration.md +547 -854
  259. package/pipeline/skills/shared/external/swiftui-patterns/references/design-polish.md +485 -537
  260. package/pipeline/skills/shared/external/swiftui-patterns/references/platform-and-sharing.md +417 -499
  261. package/pipeline/skills/shared/external/swiftui-performance/SKILL.md +213 -376
  262. package/pipeline/skills/shared/external/swiftui-performance/references/demystify-swiftui-performance-wwdc23.md +86 -175
  263. package/pipeline/skills/shared/external/swiftui-performance/references/optimizing-swiftui-performance-instruments.md +89 -195
  264. package/pipeline/skills/shared/external/swiftui-performance/references/understanding-hangs-in-your-app.md +95 -182
  265. package/pipeline/skills/shared/external/swiftui-performance/references/understanding-improving-swiftui-performance.md +71 -149
  266. package/pipeline/skills/shared/external/swiftui-performance/references/wwdc-session-sources.md +21 -27
  267. package/pipeline/skills/shared/external/swiftui-uikit-interop/SKILL.md +303 -295
  268. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/hosting-migration.md +204 -387
  269. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/representable-recipes.md +469 -683
  270. package/pipeline/skills/shared/external/swiftui-webkit/SKILL.md +140 -186
  271. package/pipeline/skills/shared/external/swiftui-webkit/references/loading-and-observation.md +75 -86
  272. package/pipeline/skills/shared/external/swiftui-webkit/references/local-content-and-custom-schemes.md +63 -60
  273. package/pipeline/skills/shared/external/swiftui-webkit/references/migration-and-fallbacks.md +69 -137
  274. package/pipeline/skills/shared/external/swiftui-webkit/references/navigation-and-javascript.md +95 -67
  275. package/pipeline/skills/shared/external/tipkit/SKILL.md +220 -335
  276. package/pipeline/skills/shared/external/tipkit/references/tipkit-patterns.md +356 -494
  277. package/pipeline/skills/shared/external/vision-framework/SKILL.md +260 -375
  278. package/pipeline/skills/shared/external/vision-framework/references/vision-requests.md +393 -515
  279. package/pipeline/skills/shared/external/vision-framework/references/visionkit-scanner.md +363 -539
  280. package/pipeline/skills/shared/external/weatherkit/SKILL.md +160 -315
  281. package/pipeline/skills/shared/external/weatherkit/references/weatherkit-patterns.md +288 -407
  282. package/pipeline/skills/shared/external/widgetkit/SKILL.md +224 -288
  283. package/pipeline/skills/shared/external/widgetkit/references/widgetkit-advanced.md +416 -719
  284. package/pipeline/skills/shared/external/NOTICE-swift-ios-skills.md +0 -39
@@ -1,487 +1,359 @@
1
1
  ---
2
2
  name: ios-simulator
3
- description: "Manages iOS Simulator devices and tests app behaviour with xcrun simctl: device lifecycle, app install and launch, push notification and location simulation, privacy permission grants, deep links via openurl, status bar overrides, screenshot and video capture, os_log streaming, app container paths, and targetEnvironment(simulator) checks. Use when managing simulator devices, testing push without APNs, simulating GPS, resetting permissions, capturing screens from the command line, streaming device logs, or debugging simulator boot and CoreSimulator failures."
3
+ description: "xcrun simctl from the command line: create, boot, erase and delete devices, install and launch apps, simulated pushes without APNs, GPS locations and routes, granting or resetting privacy permissions, openurl deep links, status bar overrides, screenshots and video, os_log streaming, app containers, targetEnvironment(simulator), boot and CoreSimulator failures. Use when scripting simulators for tests or CI or deciding what needs real hardware. Not for Instruments profiling, real APNs setup, or push-server, Core Bluetooth or Core Motion code."
4
4
  metadata:
5
- source: "dpearson2699/swift-ios-skills (PolyForm Perimeter 1.0.0)"
5
+ source: multi-agent-pipeline
6
6
  ---
7
7
 
8
- # iOS Simulator
8
+ # iOS Simulator with simctl
9
9
 
10
- Manage iOS Simulator devices and test app behavior from the command line using `xcrun simctl`. Covers the full device lifecycle, app deployment, push and location simulation, permission control, screenshot and video recording, log streaming, and compile-time simulator detection.
10
+ `xcrun simctl` controls simulators without the Simulator app's menus, which is
11
+ what test scripts and CI need. This skill covers the device lifecycle, app
12
+ installation, the simulation commands, capture, logs, the compile-time
13
+ simulator check, and where the simulator stops being a stand-in for hardware.
11
14
 
12
- For common subcommands, syntax, and examples, see [references/simctl-commands.md](references/simctl-commands.md).
15
+ Every subcommand, flag table, jq recipe and troubleshooting step is in
16
+ `references/simctl-commands.md`.
13
17
 
14
- ## Contents
18
+ ## Devices
15
19
 
16
- - [Device Lifecycle](#device-lifecycle)
17
- - [App Install and Launch](#app-install-and-launch)
18
- - [Testing Workflows](#testing-workflows)
19
- - [Screenshot and Video Recording](#screenshot-and-video-recording)
20
- - [Log Streaming](#log-streaming)
21
- - [Compile-Time Simulator Detection](#compile-time-simulator-detection)
22
- - [Simulator Limitations](#simulator-limitations)
23
- - [Common Mistakes](#common-mistakes)
24
- - [Review Checklist](#review-checklist)
25
- - [References](#references)
26
-
27
- ## Device Lifecycle
28
-
29
- ### Listing Devices and Runtimes
20
+ ### What is installed
30
21
 
31
22
  ```bash
32
- # List all available simulators grouped by runtime
33
23
  xcrun simctl list devices available
34
-
35
- # List installed runtimes
36
24
  xcrun simctl list runtimes
37
-
38
- # List only booted devices
39
25
  xcrun simctl list devices booted
40
-
41
- # JSON output for scripting
42
- xcrun simctl list -j devices available
26
+ xcrun simctl list devices available -j
43
27
  ```
44
28
 
45
- Parse JSON output to find a specific device programmatically. See [references/simctl-commands.md](references/simctl-commands.md) for `jq` parsing examples.
29
+ The first groups usable devices by runtime, the second lists runtimes, the
30
+ third shows only running devices, and `-j` switches to JSON for scripts
31
+ (parse it with `jq`; recipes in the reference).
46
32
 
47
- ### Creating a Device
33
+ ### Making a device
48
34
 
49
35
  ```bash
50
- # Find available device types and runtimes
51
36
  xcrun simctl list devicetypes
52
- xcrun simctl list runtimes
53
-
54
- # Create a device - returns the new UDID
55
- xcrun simctl create "My Test Phone" "iPhone 16 Pro" "com.apple.CoreSimulator.SimRuntime.iOS-18-4"
56
- ```
57
-
58
- Device types and runtime identifiers in examples throughout this skill are illustrative. Run `simctl list devicetypes` and `simctl list runtimes` to find the identifiers available on your system.
59
-
60
- The returned UDID identifies the device for all subsequent commands. Use descriptive names to distinguish devices in `simctl list` output.
61
-
62
- ### Boot, Shutdown, Erase, Delete
63
-
64
- ```bash
65
- # Boot a specific device
66
- xcrun simctl boot <UDID>
67
-
68
- # Boot if needed and wait until the device is ready
69
- xcrun simctl bootstatus <UDID> -b
70
-
71
- # Shutdown a running device
72
- xcrun simctl shutdown <UDID>
73
-
74
- # Factory reset - wipes all data, keeps the device
75
- xcrun simctl erase <UDID>
76
-
77
- # Delete a specific device
78
- xcrun simctl delete <UDID>
79
-
80
- # Delete all devices not available in the current Xcode
81
- xcrun simctl delete unavailable
82
-
83
- # Shutdown everything
84
- xcrun simctl shutdown all
37
+ SIM=$(xcrun simctl create "Checkout iPad" "iPad Air 11-inch (M3)" com.apple.CoreSimulator.SimRuntime.iOS-26-0)
38
+ echo "$SIM"
85
39
  ```
86
40
 
87
- Use `booted` as a UDID shorthand when exactly one simulator is running:
88
-
89
- ```bash
90
- xcrun simctl shutdown booted
91
- ```
41
+ `create` prints the new device's UDID; keep it and pass it to later commands.
42
+ Device type and runtime strings above are examples only, so read the real
43
+ ones from `list devicetypes` and `list runtimes` on the machine. A descriptive
44
+ name makes devices easy to tell apart.
92
45
 
93
- If multiple simulators are booted, `booted` picks one of them non-deterministically. Prefer explicit UDIDs when running parallel simulators.
46
+ ### Boot, stop, wipe, remove
94
47
 
95
- In scripts and CI, use `xcrun simctl bootstatus <UDID> -b` before install, launch, push, or location commands. If you call `simctl boot` separately, follow it with `xcrun simctl bootstatus <UDID>` before continuing.
48
+ | Command | Effect |
49
+ |---|---|
50
+ | `xcrun simctl boot "$SIM"` | Starts the device |
51
+ | `xcrun simctl bootstatus "$SIM" -b` | Boots when necessary, then waits for boot to finish |
52
+ | `xcrun simctl shutdown "$SIM"` / `shutdown all` | Stops one device / every device |
53
+ | `xcrun simctl erase "$SIM"` | Factory reset: data gone, device kept |
54
+ | `xcrun simctl delete "$SIM"` | Removes the device |
55
+ | `xcrun simctl delete unavailable` | Removes devices the current Xcode cannot run |
96
56
 
97
- ## App Install and Launch
57
+ - If only one simulator is up, the word `booted` can stand in for its UDID.
58
+ With several running, which one `booted` means is not defined; parallel
59
+ jobs must use explicit UDIDs.
60
+ - In scripts and CI, run `bootstatus "$SIM" -b` before installing, launching,
61
+ pushing or setting a location. If you call `boot` on its own, follow it
62
+ with `bootstatus "$SIM"`.
98
63
 
99
- ### Installing an App
64
+ ## Installing and launching
100
65
 
101
66
  ```bash
102
- # Build for simulator first
103
- xcodebuild build \
104
- -scheme MyApp \
105
- -destination 'platform=iOS Simulator,name=iPhone 16 Pro' \
106
- -derivedDataPath build/
107
-
108
- # Boot and wait for SpringBoard/services before install
109
- xcrun simctl bootstatus <UDID> -b
110
-
111
- # Install the .app bundle
112
- xcrun simctl install <UDID> build/Build/Products/Debug-iphonesimulator/MyApp.app
67
+ xcodebuild build -scheme Pantry \
68
+ -destination "platform=iOS Simulator,id=$SIM" \
69
+ -derivedDataPath build/
70
+ xcrun simctl bootstatus "$SIM" -b
71
+ xcrun simctl install "$SIM" build/Build/Products/Debug-iphonesimulator/Pantry.app
113
72
  ```
114
73
 
115
- The path must point to a `.app` directory built for the simulator architecture, not a `.ipa` file.
116
-
117
- ### Launching and Terminating
74
+ `install` wants the simulator-built `.app` folder, never an `.ipa`.
118
75
 
119
76
  ```bash
120
- # Launch by bundle ID
121
- xcrun simctl launch booted com.example.MyApp
122
-
123
- # Launch and stream stdout/stderr to the terminal
124
- xcrun simctl launch --console booted com.example.MyApp
125
-
126
- # Pass launch arguments
127
- xcrun simctl launch booted com.example.MyApp --reset-onboarding -AppleLanguages "(fr)"
128
-
129
- # Terminate a running app
130
- xcrun simctl terminate booted com.example.MyApp
77
+ xcrun simctl launch "$SIM" org.example.pantry
78
+ xcrun simctl launch --console "$SIM" org.example.pantry
79
+ xcrun simctl launch "$SIM" org.example.pantry -seedDemoData YES -AppleLanguages "(de)"
80
+ xcrun simctl terminate "$SIM" org.example.pantry
131
81
  ```
132
82
 
133
- `--console` is useful for debugging - it shows `print()` and `os_log` output directly in the terminal.
83
+ - `--console` keeps the command attached and prints the app's stdout and
84
+ stderr, so `print()` output and `os_log` messages appear in the terminal.
85
+ - Anything after the bundle ID becomes a launch argument.
134
86
 
135
- ### App Container Paths
87
+ Containers, for looking at sandboxed files, databases or defaults while
88
+ debugging:
136
89
 
137
90
  ```bash
138
- # App bundle location
139
- xcrun simctl get_app_container booted com.example.MyApp app
140
-
141
- # Data container (Documents, Library, tmp)
142
- xcrun simctl get_app_container booted com.example.MyApp data
143
-
144
- # Shared app group container
145
- xcrun simctl get_app_container booted com.example.MyApp group.com.example.shared
91
+ xcrun simctl get_app_container "$SIM" org.example.pantry app
92
+ xcrun simctl get_app_container "$SIM" org.example.pantry data
93
+ xcrun simctl get_app_container "$SIM" org.example.pantry group.org.example.pantry
146
94
  ```
147
95
 
148
- Use these paths to inspect sandboxed files, databases, or UserDefaults during debugging.
96
+ `app` is the bundle, `data` the data container (Documents, Library, tmp),
97
+ and a group identifier returns that App Group's shared container.
149
98
 
150
- ## Testing Workflows
99
+ ## Simulating the outside world
151
100
 
152
- ### Push Notification Simulation
101
+ ### Push notifications
153
102
 
154
- Create a JSON payload file:
155
-
156
- ```json
103
+ ```bash
104
+ cat > restock.json <<'JSON'
157
105
  {
158
- "aps": {
159
- "alert": {
160
- "title": "New Message",
161
- "body": "You have a new message from Alice"
162
- },
163
- "badge": 3,
164
- "sound": "default"
165
- },
166
- "customKey": "customValue"
106
+ "aps": {
107
+ "alert": { "title": "Back in stock", "body": "Oat milk is available again" },
108
+ "badge": 1,
109
+ "sound": "default"
110
+ },
111
+ "itemID": "oat-milk-1l"
167
112
  }
113
+ JSON
114
+ xcrun simctl push "$SIM" org.example.pantry restock.json
115
+ echo '{"aps":{"alert":"Pickup ready"}}' | xcrun simctl push "$SIM" org.example.pantry -
168
116
  ```
169
117
 
170
- Send it to the Simulator:
171
-
172
- ```bash
173
- # Send push payload from file
174
- xcrun simctl push booted com.example.MyApp payload.json
175
-
176
- # Pipe payload from stdin
177
- echo '{"aps":{"alert":"Quick test"}}' | xcrun simctl push booted com.example.MyApp -
178
- ```
179
-
180
- This simulates local delivery only - no APNs connection is involved. Use this to test payload handling, notification display, and notification actions. Always verify on a real device before shipping to confirm APNs delivery works end to end.
118
+ A file path or `-` (stdin) supplies the payload. Delivery is local: nothing
119
+ talks to APNs. That makes it good for payload parsing, presentation and
120
+ notification actions, and useless as proof that APNs delivery works; check
121
+ that end to end on a device before shipping.
181
122
 
182
- ### Location Simulation
123
+ ### Location
183
124
 
184
125
  ```bash
185
- # Set a fixed coordinate (latitude, longitude)
186
- xcrun simctl location booted set 37.3349,-122.0090
187
-
188
- # List available predefined scenarios
189
- xcrun simctl location booted list
190
-
191
- # Run a predefined scenario
192
- xcrun simctl location booted run "City Run"
193
-
194
- # Follow custom command-line waypoints
195
- xcrun simctl location booted start --speed=15 --interval=1 \
196
- 37.3349,-122.0090 37.3317,-122.0307
197
-
198
- # Read waypoints from stdin, one "lat,lon" pair per line
199
- printf "37.3349,-122.0090\n37.3317,-122.0307\n" | \
200
- xcrun simctl location booted start --distance=100 -
201
-
202
- # Clear the simulated location
203
- xcrun simctl location booted clear
126
+ xcrun simctl location "$SIM" set 52.3702,4.8952
127
+ xcrun simctl location "$SIM" list
128
+ xcrun simctl location "$SIM" run "Freeway Drive"
129
+ xcrun simctl location "$SIM" start --speed=12 --interval=2 52.3702,4.8952 52.3791,4.9003
130
+ printf '52.37,4.89\n52.38,4.90\n52.39,4.91\n' | xcrun simctl location "$SIM" start --distance=50 -
131
+ xcrun simctl location "$SIM" clear
204
132
  ```
205
133
 
206
- Use `set` for one coordinate, `run` for predefined scenario names, and `start` for custom waypoint routes. The command boundary matters: `simctl location run` accepts built-in scenario names (e.g., "City Run", "Freeway Drive"), not GPX file paths; `simctl location start` is the command-line path for custom coordinate waypoints. Use Xcode's Debug > Simulate Location menu for GPX-based routes.
134
+ - One fixed point: `set`. A scenario that ships with the simulator: `run`. Your own path: `start`
135
+ with waypoints, or `-` to read one `lat,lon` per line from stdin.
136
+ - `run` takes scenario names such as "City Run" or "Freeway Drive", not GPX
137
+ files. GPX routes are loaded from the Xcode menu instead (Debug >
138
+ Simulate Location).
139
+ - A simulated location applies to every Core Location client on that device.
140
+ `clear` it when the test ends so later tests are not surprised.
207
141
 
208
- Location simulation affects all apps using Core Location on the booted device. Clear the location when done to avoid unexpected test results.
209
-
210
- ### Privacy Permissions
142
+ ### Privacy permissions
211
143
 
212
144
  ```bash
213
- # Grant a permission
214
- xcrun simctl privacy booted grant photos com.example.MyApp
215
-
216
- # Revoke a permission
217
- xcrun simctl privacy booted revoke microphone com.example.MyApp
218
-
219
- # Reset all permissions for the app
220
- xcrun simctl privacy booted reset all com.example.MyApp
145
+ xcrun simctl privacy "$SIM" grant photos org.example.pantry
146
+ xcrun simctl privacy "$SIM" revoke microphone org.example.pantry
147
+ xcrun simctl privacy "$SIM" reset all org.example.pantry
221
148
  ```
222
149
 
223
- Common service names: `photos`, `microphone`, `contacts`, `calendar`, `reminders`, `location`, `location-always`, `motion`, `siri`. See [references/simctl-commands.md](references/simctl-commands.md) for the full list.
224
-
225
- Pre-granting permissions in CI avoids system permission dialogs that block automated test runs, but it can mask missing usage description keys. Keep the required Info.plist privacy strings in place and still test the normal prompt flow.
150
+ Services you will use most: `location`, `location-always`, `photos`,
151
+ `contacts`, `calendar`, `reminders`, `microphone`, `siri`, `motion` (the
152
+ reference has them all). Granting up front keeps CI from stalling on system
153
+ alerts, but it can also hide a missing usage-description key. Keep the
154
+ Info.plist privacy strings and still test the real prompt path.
226
155
 
227
- ### Deep Links and URLs
156
+ ### Deep links
228
157
 
229
158
  ```bash
230
- # Open a URL (triggers universal links or custom URL schemes)
231
- xcrun simctl openurl booted "https://example.com/product/123"
232
-
233
- # Custom URL scheme
234
- xcrun simctl openurl booted "myapp://settings/notifications"
159
+ xcrun simctl openurl "$SIM" "https://pantry.example.org/list/42"
160
+ xcrun simctl openurl "$SIM" "pantry://list/42"
235
161
  ```
236
162
 
237
- For universal links, the app's associated domains entitlement must be configured. The Simulator uses the `apple-app-site-association` file from the domain.
163
+ An `https` URL exercises universal links, which need the associated domains
164
+ entitlement; the simulator downloads the domain's
165
+ `apple-app-site-association` file. A custom scheme opens the app directly.
238
166
 
239
- ### Status Bar Overrides
167
+ ### Status bar
240
168
 
241
169
  ```bash
242
- # Set a clean status bar for screenshots
243
- xcrun simctl status_bar booted override \
244
- --time "9:41" \
245
- --batteryState charged \
246
- --batteryLevel 100 \
247
- --cellularMode active \
248
- --cellularBars 4 \
249
- --wifiBars 3 \
250
- --operatorName ""
251
-
252
- # Clear all overrides
253
- xcrun simctl status_bar booted clear
170
+ xcrun simctl status_bar "$SIM" override --operatorName '' --time "9:41" \
171
+ --wifiBars 3 --cellularBars 4 --cellularMode active --batteryLevel 100 --batteryState charged
172
+ xcrun simctl status_bar "$SIM" clear
254
173
  ```
255
174
 
256
- Use status bar overrides to produce consistent App Store screenshots. Always clear overrides after capturing to avoid confusing other testing.
175
+ Overrides give App Store screenshots a consistent status bar. Clear them once
176
+ the captures are done.
257
177
 
258
- ## Screenshot and Video Recording
178
+ ## Screenshots and video
259
179
 
260
180
  ```bash
261
- # Capture a screenshot
262
- xcrun simctl io booted screenshot screenshot.png
263
-
264
- # Record video (press Ctrl+C to stop)
265
- xcrun simctl io booted recordVideo recording.mov
266
-
267
- # Screenshot with specific display mask
268
- xcrun simctl io booted screenshot --mask black screenshot.png
181
+ xcrun simctl io "$SIM" screenshot home.png
182
+ xcrun simctl io "$SIM" screenshot --mask=alpha framed.png
183
+ xcrun simctl io "$SIM" recordVideo --mask=black onboarding.mov
269
184
  ```
270
185
 
271
- `--mask` options: `ignored` (default, no mask), `alpha` (transparent corners), `black` (black corners). Use `alpha` or `black` when capturing screenshots that show the device shape. The `alpha` mask is only supported for screenshots - video recording falls back to `black`.
186
+ - Masks: `ignored` (default, plain rectangle), `alpha` (transparent rounded
187
+ corners), `black` (black corners). Pick `alpha` or `black` to show the
188
+ device outline.
189
+ - `alpha` works for screenshots only; video falls back to `black`.
190
+ - Recording runs until SIGINT (Ctrl+C) and the file is written only after it
191
+ stops. A SIGKILL ends it with no file at all.
272
192
 
273
- Video recording continues until the process receives SIGINT (Ctrl+C). The recording is saved only after stopping - killing the process with SIGKILL loses the file.
274
-
275
- ## Log Streaming
276
-
277
- ### Basic Log Stream
193
+ ## Logs
278
194
 
279
195
  ```bash
280
- # Stream all logs at debug level and above
281
- xcrun simctl spawn booted log stream --level debug
282
-
283
- # Filter by subsystem
284
- xcrun simctl spawn booted log stream --level debug \
285
- --predicate 'subsystem == "com.example.app"'
286
-
287
- # Filter by subsystem and category
288
- xcrun simctl spawn booted log stream --level debug \
289
- --predicate 'subsystem == "com.example.app" AND category == "networking"'
290
-
291
- # Filter by process name
292
- xcrun simctl spawn booted log stream \
293
- --predicate 'process == "MyApp"'
196
+ xcrun simctl spawn "$SIM" log stream \
197
+ --predicate 'subsystem == "org.example.pantry" AND category == "sync"' --level debug
198
+ xcrun simctl spawn "$SIM" log stream --predicate 'process == "Pantry"'
294
199
  ```
295
200
 
296
- ### Combining with os.Logger
297
-
298
- Design subsystems and categories for filterability:
201
+ `--level debug` shows debug messages and everything above them. Filter by
202
+ subsystem, add a category, or filter by process name. Design the logging so
203
+ these filters are useful:
299
204
 
300
205
  ```swift
206
+ import Foundation
301
207
  import os
302
208
 
303
- let networkLogger = Logger(subsystem: "com.example.app", category: "networking")
304
- let uiLogger = Logger(subsystem: "com.example.app", category: "ui")
305
-
306
- func fetchData() async throws -> Data {
307
- networkLogger.debug("Starting request to /api/data")
308
- let (data, response) = try await URLSession.shared.data(from: url)
309
- networkLogger.info("Received \(data.count) bytes, status: \((response as? HTTPURLResponse)?.statusCode ?? 0)")
310
- return data
209
+ enum Diagnostics {
210
+ static let sync = Logger(subsystem: "org.example.pantry", category: "sync")
211
+ static let screens = Logger(subsystem: "org.example.pantry", category: "screens")
311
212
  }
312
- ```
313
-
314
- Then filter the log stream to see only networking output:
315
-
316
- ```bash
317
- xcrun simctl spawn booted log stream --level debug \
318
- --predicate 'subsystem == "com.example.app" AND category == "networking"'
319
- ```
320
-
321
- ## Compile-Time Simulator Detection
322
-
323
- Use `#if targetEnvironment(simulator)` to exclude code that cannot run in the Simulator:
324
213
 
325
- ```swift
326
- func registerForPush() {
327
- #if targetEnvironment(simulator)
328
- logger.info("Skipping APNs registration - running in Simulator")
329
- #else
330
- UIApplication.shared.registerForRemoteNotifications()
331
- #endif
214
+ func refreshShoppingList(from endpoint: URL) async throws -> Data {
215
+ Diagnostics.screens.info("Refreshing shopping list")
216
+ let (body, response) = try await URLSession.shared.data(for: URLRequest(url: endpoint))
217
+ let status = (response as? HTTPURLResponse)?.statusCode ?? -1
218
+ Diagnostics.sync.debug("List payload \(body.count) bytes, HTTP \(status)")
219
+ return body
332
220
  }
333
221
  ```
334
222
 
335
- Runtime detection via environment variables:
223
+ ## Detecting the simulator in code
336
224
 
337
225
  ```swift
338
- var isSimulator: Bool {
339
- ProcessInfo.processInfo.environment["SIMULATOR_DEVICE_NAME"] != nil
340
- }
341
- ```
342
-
343
- Prefer compile-time checks (`#if targetEnvironment(simulator)`) over runtime checks. The compiler strips excluded code entirely, preventing linker errors from unavailable symbols.
344
-
345
- ## Simulator Limitations
346
-
347
- When classifying a test as Simulator-supported or hardware-required, separate "can trigger this behavior" from "can validate real-device fidelity":
348
-
349
- - Simulator-supported triggers/proxies: local push with `simctl push`, location changes, memory warnings, Face ID or Touch ID enrollment/match/nonmatch menu actions, manual iCloud sync trigger, privacy grants/resets, status bar overrides, screenshots, and video capture.
350
- - Hardware-required validation: APNs delivery, BLE and NFC, real camera or microphone input, motion sensors, Secure Enclave, App Attest, automatic iCloud propagation/conflicts/background behavior, CPU throughput, general processing speed, networking throughput or latency, Metal shader correctness, GPU limits, memory bandwidth, frame timing, memory pressure, Jetsam, and thermal behavior.
351
-
352
- Do not classify "iCloud sync" as a single hardware-only item. Split it explicitly:
353
-
354
- - Simulator-supported: manual iCloud sync triggering and basic app response to sync callbacks.
355
- - Hardware-required: automatic iCloud propagation, multiple real devices/accounts, conflict resolution, notification-triggered sync, background delivery, and account/device state differences.
356
-
357
- | Capability | Simulator Support |
358
- |-----------|------------------|
359
- | APNs push delivery | No - use `simctl push` for local simulation |
360
- | Performance fidelity | Relative only - Simulator is not accurate for CPU/processing performance, networking speed, graphics/Metal, memory bandwidth, frame timing, memory pressure, Jetsam, shader correctness, or thermal behavior; verify performance-sensitive work on hardware |
361
- | Metal GPU family parity | Partial - Simulator uses the host Mac GPU, not the device GPU; some shaders and limits differ |
362
- | Camera hardware | No - use photo library injection or mock `AVCaptureSession` |
363
- | Audio input / microphone | No general app audio input; Siri can be activated from Simulator menus |
364
- | Secure Enclave | No - `kSecAttrTokenIDSecureEnclave` operations fail |
365
- | App Attest (DCAppAttestService) | No - `isSupported` returns `false` |
366
- | DockKit motor control | No - no physical accessory connection |
367
- | Accelerometer / Gyroscope | No motion sensor support; use real devices for motion-dependent behavior |
368
- | Barometer | No |
369
- | NFC (Core NFC) | No |
370
- | Bluetooth (Core Bluetooth) | No - use a real device for BLE testing |
371
- | CarPlay display simulation | Supported through Simulator's external display/CarPlay option; still verify in vehicle or device setups |
372
- | Face ID / Touch ID hardware | No hardware - use Features > Face ID / Touch ID menu in Simulator |
373
- | Memory warnings, manual iCloud sync trigger, location changes | Supported through Simulator menus or `simctl` where available |
374
- | Automatic iCloud sync behavior | Not fully simulated - validate notification-triggered sync, real account/device propagation, conflicts, and background behavior on hardware |
375
- | Cellular network conditions | No - use Network Link Conditioner on Mac |
376
-
377
- Treat Simulator performance as a functional smoke signal only. When answering performance-boundary questions, explicitly name CPU throughput/general processing speed and networking throughput/latency alongside graphics, Metal shader correctness, memory bandwidth, frame timing, memory pressure, Jetsam behavior, and thermal behavior.
378
-
379
- Use this minimum wording in release-checklist answers: "Simulator is not an accurate performance proxy for processing/CPU, graphics/Metal, memory, networking throughput/latency, Metal GPU behavior, frame timing, memory pressure/Jetsam, or thermal behavior." If a prompt only names "Metal performance," still include processing, memory, and networking in the device-verification list.
380
-
381
- ## Common Mistakes
382
-
383
- ### DON'T: Hardcode simulator UDIDs in scripts
384
-
385
- UDIDs change when simulators are deleted and recreated. Hardcoded values break on other machines and CI.
386
-
387
- ```bash
388
- # WRONG - hardcoded UDID
389
- xcrun simctl boot "A1B2C3D4-E5F6-7890-ABCD-EF1234567890"
390
-
391
- # CORRECT - look up by name and runtime
392
- UDID=$(xcrun simctl list -j devices available | \
393
- jq -r '.devices["com.apple.CoreSimulator.SimRuntime.iOS-18-4"][] | select(.name == "iPhone 16 Pro") | .udid')
394
- xcrun simctl boot "$UDID"
395
-
396
- # CORRECT - use "booted" when one simulator is running
397
- xcrun simctl install booted MyApp.app
398
- ```
399
-
400
- ### DON'T: Install or launch on a shutdown simulator
401
-
402
- `simctl install` and `simctl launch` require a booted device. They fail silently or with an unhelpful error on a shutdown device.
403
-
404
- ```bash
405
- # WRONG - device is not booted
406
- xcrun simctl install <UDID> MyApp.app # fails
407
-
408
- # CORRECT - boot first, then install
409
- xcrun simctl boot <UDID>
410
- xcrun simctl install <UDID> MyApp.app
411
- xcrun simctl launch <UDID> com.example.MyApp
412
- ```
413
-
414
- ### DON'T: Leave zombie simulators running in CI
415
-
416
- Each booted simulator consumes memory and CPU. CI pipelines that create simulators without cleanup accumulate zombie devices.
226
+ import UIKit
227
+ import os
417
228
 
418
- ```bash
419
- # WRONG - CI script creates and boots but never cleans up
420
- xcrun simctl create "CI Phone" "iPhone 16 Pro" "com.apple.CoreSimulator.SimRuntime.iOS-18-4"
421
- xcrun simctl boot "$UDID"
422
- # ... tests run, pipeline exits ...
423
-
424
- # CORRECT - always clean up in CI teardown
425
- cleanup() {
426
- xcrun simctl shutdown all
427
- xcrun simctl delete "$UDID"
229
+ @MainActor
230
+ func enableRemotePush() {
231
+ #if !targetEnvironment(simulator)
232
+ UIApplication.shared.registerForRemoteNotifications()
233
+ #else
234
+ Logger(subsystem: "org.example.pantry", category: "push").info("Remote push registration skipped in Simulator")
235
+ #endif
428
236
  }
429
- trap cleanup EXIT
430
- ```
431
-
432
- ### DON'T: Assume simctl push validates APNs delivery
433
-
434
- `simctl push` bypasses the entire APNs infrastructure. It tests payload parsing and notification UI, not token registration, entitlements, or server-side delivery.
435
-
436
- ```bash
437
- # WRONG - only testing with simctl, shipping without real device testing
438
- xcrun simctl push booted com.example.MyApp payload.json
439
- # "Push works!" - no, it only proves the app handles the payload
440
-
441
- # CORRECT - use simctl for development iteration, then verify end-to-end on a real device
442
- # 1. simctl push during development for fast iteration
443
- # 2. Real device + APNs sandbox for integration testing before release
444
237
  ```
445
238
 
446
- ### DON'T: Keep retrying boot on a stuck simulator
447
-
448
- A simulator stuck in the "Booting" state will not recover by retrying `boot`. The underlying CoreSimulator state is corrupted.
449
-
450
- ```bash
451
- # WRONG - retry loop on a stuck device
452
- xcrun simctl boot "$UDID" # "Unable to boot device in current state: Booting"
453
- xcrun simctl boot "$UDID" # same error, forever
454
-
455
- # CORRECT - shut down, erase, and retry
456
- xcrun simctl shutdown "$UDID"
457
- xcrun simctl erase "$UDID"
458
- xcrun simctl boot "$UDID"
459
-
460
- # If that fails, reset CoreSimulator entirely
461
- xcrun simctl shutdown all
462
- xcrun simctl erase all
463
- # Last resort: rm -rf ~/Library/Developer/CoreSimulator/Caches
464
- ```
465
-
466
- ## Review Checklist
467
-
468
- - [ ] Simulator devices created with explicit device type and runtime identifiers
469
- - [ ] Scripts use `booted` or parsed UDID from JSON output, not hardcoded values
470
- - [ ] Push notification payloads tested via `simctl push` during development
471
- - [ ] Push notification delivery verified on a real device before release
472
- - [ ] Location simulation tested with fixed coordinates, predefined scenarios, and custom waypoints when needed
473
- - [ ] Privacy permissions pre-granted in CI to avoid blocking dialogs
474
- - [ ] `#if targetEnvironment(simulator)` guards around APIs unavailable in Simulator
475
- - [ ] Status bar overrides cleared after capturing screenshots
476
- - [ ] CI pipelines shut down and delete simulators in teardown
477
- - [ ] Log streaming configured with subsystem/category predicates for focused debugging
478
- - [ ] App container paths used for inspecting sandboxed data during debugging
239
+ At run time, `ProcessInfo.processInfo.environment["SIMULATOR_DEVICE_NAME"] != nil`
240
+ also tells you, but prefer the compile-time check: the excluded code is not
241
+ compiled at all, so symbols that do not exist for the simulator cannot cause
242
+ link errors.
243
+
244
+ ## Where the simulator ends
245
+
246
+ Sort each test by two questions: can the simulator *trigger* the behavior, and
247
+ does the test need *real-device fidelity*?
248
+
249
+ The simulator can trigger or approximate: screenshots and video, status bar
250
+ overrides, granting and resetting permissions, memory warnings, a new
251
+ location, a push delivered locally with `simctl push`, a hand-started iCloud
252
+ sync, and biometric enrollment with matching or failing faces and fingers
253
+ from the Features menu.
254
+
255
+ Real hardware is required to validate: delivery through APNs; NFC and
256
+ Bluetooth LE; live camera and microphone input; motion sensors; App Attest
257
+ and the Secure Enclave; iCloud changes that propagate on their own, their
258
+ conflicts and their background delivery; processing speed and CPU
259
+ throughput; how fast and how slow the network really is; whether Metal
260
+ shaders render correctly and what the GPU allows; memory bandwidth; frame
261
+ pacing; memory pressure and Jetsam; heat.
262
+
263
+ iCloud is not one item. Triggering a sync by hand and checking that the app
264
+ reacts are simulator work. Automatic propagation, several devices or
265
+ accounts, conflict resolution, sync started by a push, background delivery,
266
+ and differences in account or device state need hardware.
267
+
268
+ | Capability | In Simulator | Notes |
269
+ |---|---|---|
270
+ | APNs push delivery | No | Local `simctl push` only |
271
+ | Performance | Relative only | Says nothing reliable about CPU, networking, Metal or graphics, shader correctness, memory bandwidth or pressure, frame pacing, Jetsam or heat; measure on devices |
272
+ | Metal GPU family parity | Partial | The Mac's GPU does the work, so limits and some shader behavior differ |
273
+ | Camera | No | Add photos to the library or mock `AVCaptureSession` |
274
+ | Microphone / audio input | No general app input | Siri can be triggered from the Simulator menus |
275
+ | Secure Enclave | No | Operations using `kSecAttrTokenIDSecureEnclave` fail |
276
+ | App Attest | No | `DCAppAttestService.shared.isSupported` is `false` |
277
+ | DockKit motor control | No | Accessories cannot connect |
278
+ | Accelerometer, gyroscope, barometer | No | |
279
+ | Core Bluetooth | No | BLE testing needs a device |
280
+ | Core NFC | No | |
281
+ | CarPlay display | Yes | Offered with the external display options; confirm in an actual car or head unit too |
282
+ | Face ID / Touch ID | No sensor | Enrollment and match results are simulated from the Features menu |
283
+ | Memory warnings, manual iCloud sync, location changes | Yes | Menus or `simctl` |
284
+ | Automatic iCloud sync | Not fully | Validate on hardware |
285
+ | Cellular conditions | No | Shape traffic with the Mac's Network Link Conditioner |
286
+
287
+ Numbers from the simulator only show that something works at all. Whenever a
288
+ question touches performance limits, the answer lists every area that needs a
289
+ device: processing and CPU, network speed and latency, graphics, whether Metal
290
+ shaders are correct, memory bandwidth, frame pacing, memory pressure and
291
+ Jetsam, and heat.
292
+
293
+ A release checklist always carries this sentence, word for word:
294
+
295
+ > Simulator timings do not predict device timings, so before release we
296
+ > measure on real hardware: CPU and processing, graphics and Metal, Metal GPU
297
+ > behavior, memory, memory pressure and Jetsam, frame pacing, network speed
298
+ > and latency, and thermal behavior.
299
+
300
+ Even a question about Metal alone gets processing, memory and networking in
301
+ that device list.
302
+
303
+ ## Common mistakes
304
+
305
+ 1. **Hard-coded UDIDs.** They change whenever a device is deleted and
306
+ recreated and never match on another Mac or CI runner. Look the UDID up:
307
+
308
+ ```bash
309
+ SIM=$(xcrun simctl list devices available --json |
310
+ jq -r --arg rt "com.apple.CoreSimulator.SimRuntime.iOS-26-0" \
311
+ '.devices[$rt][] | select(.name == "Checkout iPad") | .udid')
312
+ ```
313
+
314
+ or use `booted` when exactly one simulator runs.
315
+ 2. **Installing or launching on a stopped device.** These fail silently or
316
+ with unhelpful errors. Boot, then install, then launch.
317
+ 3. **Simulators left running in CI.** They keep eating memory and CPU. Clean
318
+ up on every exit path:
319
+
320
+ ```bash
321
+ teardown() {
322
+ xcrun simctl shutdown "$SIM"
323
+ xcrun simctl delete "$SIM"
324
+ xcrun simctl shutdown all
325
+ }
326
+ trap teardown EXIT
327
+ ```
328
+
329
+ 4. **Taking `simctl push` as APNs proof.** It never touches APNs, so it says
330
+ nothing about token registration, entitlements or server delivery. Iterate
331
+ with it, then confirm on a device against the APNs sandbox before release.
332
+ 5. **Calling `boot` again on a stuck device.** When boot reports that the
333
+ device is already in the Booting state and never finishes, CoreSimulator's
334
+ state is damaged. Shut the
335
+ device down, erase it and boot again; if that fails, `shutdown all` plus
336
+ `erase all`; as a last resort delete the cache folder
337
+ (`~/Library/Developer/CoreSimulator/Caches`).
338
+
339
+ ## Review checklist
340
+
341
+ - [ ] `create` calls pass explicit device-type and runtime identifiers
342
+ - [ ] No literal UDIDs in scripts; `booted` or a JSON lookup instead
343
+ - [ ] Push payloads exercised with `simctl push` during development
344
+ - [ ] Push delivery confirmed on a physical device before release
345
+ - [ ] Location covered with fixed points, built-in scenarios and custom waypoints as needed
346
+ - [ ] CI grants privacy permissions up front
347
+ - [ ] `#if targetEnvironment(simulator)` guards APIs the simulator lacks
348
+ - [ ] Status bar overrides cleared after screenshots
349
+ - [ ] CI teardown shuts down and deletes its simulators
350
+ - [ ] Log streams filter by subsystem and category
351
+ - [ ] App container paths used to inspect sandbox data
479
352
 
480
353
  ## References
481
354
 
482
- - [Running your app in Simulator or on a device](https://sosumi.ai/documentation/xcode/running-your-app-in-simulator-or-on-a-device)
483
- - [Downloading and installing additional Xcode components](https://sosumi.ai/documentation/xcode/installing-additional-simulator-runtimes)
484
- - [Testing in Simulator versus testing on hardware devices](https://sosumi.ai/documentation/xcode/testing-in-simulator-versus-testing-on-hardware-devices)
485
- - [Testing complex hardware device scenarios in Simulator](https://sosumi.ai/documentation/xcode/testing-complex-hardware-device-scenarios-in-simulator)
486
- - [Simulating an external display or CarPlay](https://sosumi.ai/documentation/xcode/simulating-an-external-display-or-carplay)
487
- - simctl command reference: [references/simctl-commands.md](references/simctl-commands.md)
355
+ - `references/simctl-commands.md`
356
+ - Running on simulated or physical devices: https://developer.apple.com/documentation/xcode/running-your-app-on-simulated-or-physical-devices
357
+ - Downloading simulator runtimes and other components: https://developer.apple.com/documentation/xcode/downloading-and-installing-additional-xcode-components
358
+ - Configuring a simulated device's environment: https://developer.apple.com/documentation/xcode/configuring-the-environment-of-a-simulated-device
359
+ - Device Hub (managing simulated and physical devices): https://developer.apple.com/documentation/xcode/device-hub