Add TestFlight upload command (iOS support phase 4)#57
Merged
Conversation
Implements the final phase of the iOS build support plan: pushing the signed .ipa to TestFlight via the App Store Connect API. - IosService.UploadAsync gates on IosSigningAvailable and a macOS host (no-ops cleanly otherwise), locates the .ipa produced by `ios package` (explicit --ipa, or by searching each detected head's bin), installs the App Store Connect API key (.p8) under ~/.appstoreconnect/private_keys, and runs `xcrun altool --upload-app` per archive. - altool's exit code is unreliable, so the output is also scanned for the UPLOAD FAILED / Failed to upload package strings; either signal fails the step. The API key is never logged and the decoded .p8 is wiped after the run. - New App Store Connect config inputs (APP_STORE_CONNECT_KEY_BASE64, _KEY_ID, _ISSUER_ID); iOS env reading extracted to a helper to keep CreateFromEnvironmentAsync under the cyclomatic-complexity limit. - New `ios upload` CLI subcommand wired in Program.cs. - Unit tests for the signing gate, altool command construction, failure-string detection, and .ipa location. - CLAUDE.md updated: command tree, upload description, env-var table, CI guidance. https://claude.ai/code/session_013EuS2hr9kbcLWYbQPNy4UE
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Implements the final phase of
docs/ios-support-plan.md: pushing the signed.ipato TestFlight via the App Store Connect API. Builds on phases 1–3 (detection/host gating, unsigned build, signed packaging).What changed
IosService.UploadAsync(new) gates onIosSigningAvailableand a macOS host, no-ops cleanly otherwise (so the command is safe to call unconditionally from a consumer workflow). It locates the.ipaproduced byios packagein the same workspace (an explicit--ipa, or by searching each detected head'sbin), installs the App Store Connect API key (.p8) under~/.appstoreconnect/private_keys, and runsxcrun altool --upload-app --type ios --apiKey … --apiIssuer …per archive.altoolhas returned0on an App Store Connect validation failure, so the captured output is also scanned forUPLOAD FAILED/Failed to upload package; either signal fails the step. The API key is never logged and the decoded.p8is wiped after the run.APP_STORE_CONNECT_KEY_BASE64,APP_STORE_CONNECT_KEY_ID,APP_STORE_CONNECT_ISSUER_ID) onBuildConfiguration, read inBuildConfigurationProvider. The iOS env reading was extracted into a helper to keepCreateFromEnvironmentAsyncunder the cyclomatic-complexity limit (CA1502).ios uploadsubcommand (--workspace,--configuration,--verbose,--project,--ipa) wired inProgram.cs.altoolcommand-string construction, failure-string detection, and.ipalocation.ios uploaddescription, env-var table, and the consumer CI workflow guidance.Testing
Full suite green locally (345 tests, including the new upload tests).
The signing/upload path itself cannot be exercised without macOS, Apple signing material, and an App Store Connect account, matching the plan's testing note. The unit tests cover the host/signing gate, command construction, and failure detection; the real upload is verified on a macOS runner against a consumer repo.
https://claude.ai/code/session_013EuS2hr9kbcLWYbQPNy4UE
Generated by Claude Code