ReviewOS

also looking at this

craft-native/craft

iOS: the health query pair — ratchet 31 → 29

#99
Merged glennmichael123 wants to merge feat/ios-health into main
8 files +922 -4
packages/ios/fixtures/zig-slice/build-and-run.shmodified+10-1
Changes to packages/ios/fixtures/zig-slice/build-and-run.sh
@@ -64,7 +64,7 @@ swiftc -target "$TRIPLE" -sdk "$SDK" \
6464 "$ROOT/packages/zig/zig-out/lib/$LIB" \
6565 -framework UIKit -framework WebKit -framework Foundation -framework Security \
6666 -framework Vision -framework LocalAuthentication -framework PDFKit \
67 -framework WatchConnectivity -framework CoreBluetooth -framework AVFoundation \
67 -framework WatchConnectivity -framework CoreBluetooth -framework AVFoundation -framework HealthKit \
6868 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker "$OUT/sim.entitlements" \
6969 -o "$APP/CraftSlice"
7070
@@ -350,4 +350,13 @@ C64="$(count 64)"
350350[ "$C64" -ge 1 ] || { echo "FAIL: stopAudioRecording did not return a real M4A"; exit 1; }
351351echo "ok: recording came back as a decodable M4A data URL (i=64 seen ${C64}x)"
352352
353C66="$(count 66)"
354# HealthKit is linked and the store exists on an iPhone simulator, so this is
355# HKStatisticsQuery's own answer. What is asserted is that it ANSWERS: the
356# spec's arm has no else, so before this the promise simply stayed pending.
357# requestHealthAuthorization is not exercised — it presents a sheet, and
358# simctl has no HealthKit privacy service to pre-grant.
359[ "$C66" -ge 1 ] || { echo "FAIL: getHealthData neither answered nor failed — it hung"; exit 1; }
360echo "ok: health query answered rather than hanging (i=66 seen ${C66}x)"
361
353362echo "PASS"