Skip to main content

Module upload

Module upload 

Source
Expand description

Uploading an .ipa/.pkg to App Store Connect through xcrun altool.

The App Store Connect REST API has no binary-upload endpoint a client can drive end to end, so this shells out to Apple’s own uploader. What this module adds over calling altool by hand is authentication parity: altool is handed the exact .p8 the rest of the CLI resolved, via --p8-file-path, instead of searching ~/.appstoreconnect/private_keys and friends for an AuthKey_<id>.p8. A search can find a stale key with the same id that the API then rejects with a 401, which is indistinguishable at the call site from a revoked key.

Once the upload succeeds, look the build up with BuildsApi::list_builds filtered by build number, or pass wait to have altool block until App Store Connect finishes processing.

Structs§

AltoolAuth
The API key altool authenticates with. Paths and ids only: altool’s --auth-string would take the key itself, which would then sit in the process table for any local user to read, so it is never used.
UploadOutcome
The result of one altool upload, as reported to callers.

Enums§

AltoolOp
Which altool operation to run against the package: the pre-flight --validate-app or the real --upload-package. They take the same authentication and the same output format, so they share one argv builder.

Functions§

altool_args
The arguments after xcrun. Separate from upload_package so the exact command line is testable and --dry-run can print it.
upload_package
Run xcrun altool --upload-package and report what happened.
validate_app
Run xcrun altool --validate-app and report what happened.
validate_package
Check the package before spending minutes in altool on it.