ReviewOS

also looking at this

craft-native/craft

test(ios): install the Watch-enabled app and read the APNs environment it signs

#218
Merged glennmichael123 wants to merge fix/ios-apns-environment-resolved into main
6 files +248 -12
packages/ios/README.mdmodified+15-4
Changes to packages/ios/README.md
@@ -620,10 +620,21 @@ On macOS with Xcode and XcodeGen installed, run `bun run test:templates` from
620620`packages/ios`. It generates a minimal app, a capability-heavy iOS app, and the
621621same capability-heavy app with a Watch companion. It builds iOS, Live Activity,
622622Watch extension, and Watch app targets against device SDKs with code signing
623disabled. The Watch-enabled iOS target is not built because Xcode requires a
624watchOS runtime to resolve its embedded-app graph; its identical Swift source
625is built in the sibling capability fixture. This checks the actual generated
626Swift and Xcode projects; `bun test` checks the builder's behavior separately.
623disabled.
624
625The Watch-enabled app is also built the way Xcode builds it for a person, with
626the Watch app embedded. The script checks that the bundle carries
627`Watch/<App>Watch.app` with `WKWatchKitApp` and its WatchKit extension, then
628installs the app on an iOS simulator. That needs a watchOS simulator runtime
629matching the selected Xcode (`xcodebuild -downloadPlatform watchOS`), and the
630script fails without one rather than skipping.
631
632Finally, a push-enabled app is built for the simulator in Debug and Release with
633ad-hoc signing. The script reads the `aps-environment` Xcode actually signed
634into each: `development` for Debug, `production` for Release.
635
636This checks the actual generated Swift and Xcode projects; `bun test` checks the
637builder's behavior separately.
627638Temporary projects are removed after the run. Pass `--keep` to retain them for
628639debugging.
629640