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