ReviewOS

also looking at this

craft-native/craft

docs(ios): correct the permanently-Swift list, 5 of whose 13 entries were migrated

#114
Merged glennmichael123 wants to merge docs/correct-permanently-swift-list into main
1 file +40 -10
docs/ios-development.mdmodified+40-10
Changes to docs/ios-development.md
@@ -319,16 +319,46 @@ is SceneKit node-graph manipulation; through `objc_msgSend` it would be miserabl
319319low-value. Zig-native is a means, not an end, and five actions of SceneKit glue is where it
320320stops paying. Declare the boundary in `capability_registry.zig` with a `reason`.
321321
322### What stays Swift, permanently
323
324Thirteen actions have no usable Objective-C surface:
325
326- **StoreKit 2** — `getProducts`, `purchase`, `restorePurchases` (`Product.PurchaseResult` is Swift-only)
327- **ActivityKit** — `startLiveActivity`, `updateLiveActivity`, `endLiveActivity`
328- **WidgetKit** — `updateWidget`, `reloadWidgets`
329- **App Intents** — `registerSiriShortcut`, `removeSiriShortcut`
330- **WatchConnectivity** — `sendToWatch`, `updateWatchContext`, `isWatchReachable` (`WCSession`
331 *is* ObjC, but it is only useful paired with the Watch app template, so it stays with its peer)
322### What stays Swift
323
324Eight actions, not the thirteen this list used to claim. Five of the thirteen have
325since been migrated, and the list was not updated — which mattered, because it is
326the only recorded reason for most of these and it was being read as authoritative
327while 38% of it was false:
328
329- **App Intents** — `registerSiriShortcut`, `removeSiriShortcut` were migrated in
330 `bridge_mobile_siri.zig`. Plain `NSUserActivity`; App Intents was never needed.
331- **WatchConnectivity** — `sendToWatch`, `updateWatchContext`, `isWatchReachable` were
332 migrated in `bridge_mobile_watch.zig`. The note conceded `WCSession` *is* ObjC and
333 kept them anyway "to stay with its peer", which is not a technical barrier.
334
335What actually has no usable Objective-C surface:
336
337- **StoreKit 2** — `getProducts`, `purchase`, `restorePurchases`. `Product.PurchaseResult`
338 is Swift-only. Note the narrower claim: StoreKit *1* is ObjC and this repo already
339 drives it from Zig in `bridge_iap.zig` for macOS, so "no ObjC surface" is true of the
340 API the spec uses, not of in-app purchase as such. Migrating would mean choosing
341 StoreKit 1 on iOS, which is a product decision rather than a mechanical one.
342- **ActivityKit** — `startLiveActivity`, `updateLiveActivity`, `endLiveActivity`. Swift-only,
343 no ObjC class to reach.
344- **WidgetKit** — `updateWidget`, `reloadWidgets`. `WidgetCenter` has no ObjC class; the
345 only route is Swift's own ABI symbols behind a `swiftself` trampoline, which is not
346 worth two actions.
347
348And two boundaries drawn by choice rather than by the SDK, recorded here because
349nothing in the code says so — `capability_registry.zig` was supposed to carry a
350`reason` for the first and never got one:
351
352- **ARKit / SceneKit** — `startAR`, `stopAR`, `getARPlanes`, `placeARObject`, `removeARObject`.
353 `CraftApp.swift` is SceneKit node-graph manipulation; through `objc_msgSend` it would
354 be miserable and low-value.
355- **`registerBackgroundTask`** — see `bridge_mobile_bgtasks.zig`'s header. Structural:
356 `BGTaskScheduler.register` must run before the app finishes launching, so a
357 page-triggered call is late by construction.
358
359A note here is the *only* record for most of these. When one is wrong it is not
360self-correcting — the `scheduleNotification` deferral outlived its blocker by a day
361and cost several passes, and the five entries above outlived theirs entirely.
332362
333363---
334364