mirror of
https://github.com/home-assistant/iOS.git
synced 2026-06-24 01:03:16 -05:00
## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
The macOS `distribute` job fails at the **export** step on the
`macos-26` runner (archive succeeds; export fails):
```
error: exportArchive exportOptionsPlist error for key "method"
expected one {app-store-connect, release-testing, enterprise, debugging, validation} but found developer-id
```
### Root cause
The export rejection is a downstream symptom. The real cause is
**earlier**, in gym's platform detection:
```
[10:06:11]: Skipped Swift Package Manager dependencies resolution.
$ xcodebuild -showBuildSettings -workspace HomeAssistant.xcworkspace -scheme App-Release 2>&1
[10:07:11]: Command timed out after 60 seconds on try 1 of 4, trying again with a 120 second timeout...
[10:07:35]: Could not read the "SUPPORTED_PLATFORMS" build setting, assuming that the project supports iOS only.
```
`build_mac_app` already sets `catalyst_platform = "macos"` internally,
but gym only honours it when `supports_mac_catalyst?` is true. That
check runs `xcodebuild -showBuildSettings`, which — because SPM
resolution is skipped — runs cold and, for this large workspace,
**exceeds the 60s `FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT`**. When it
times out, gym can't read `SUPPORTS_MACCATALYST`, assumes the project is
iOS-only, and archives `generic/platform=iOS`. The resulting **iOS**
archive can't export the macOS-only `developer-id` method under Xcode
26.4.1's stricter `-exportArchive` (older Xcode tolerated it). The
`app-store` build never runs because the `developer-id` export fails
first.
This also explains why it "worked before": the probe used to complete
within 60s, so `supports_mac_catalyst?` was true and gym archived the
Mac Catalyst variant. As the workspace grew / Xcode got slower, the cold
probe started timing out.
### Fix
Raise `FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT` from `60` to `180` so the
cold `-showBuildSettings` probe completes. gym then reads
`SUPPORTS_MACCATALYST=YES`, archives `generic/platform=macOS` (Mac
Catalyst), takes the pkg/app export path, and exports `developer-id` +
`app-store` as designed.
> Note: an earlier revision of this PR added `catalyst_platform:
'macos'` to the `build_mac_app` calls. That was wrong — `build_mac_app`
rejects that option (it sets it internally), which only produced a new
error. It has been reverted; the lane is unchanged from `main`.
## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
N/A — CI / build tooling only, no app or UI changes.
## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#
## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
- The `Distribute` workflow only runs on push to `main` /
`workflow_dispatch`, so PR CI does not exercise this path. Please
confirm with a manual `Distribute` run on this branch before merging.
- If 180s still proves tight on a cold runner,
`FASTLANE_XCODEBUILD_SETTINGS_RETRIES` (default 3, with doubling
backoff) provides additional headroom, or the workflow could pre-resolve
SPM packages before `fastlane mac build`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>