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§
- Altool
Auth - The API key altool authenticates with. Paths and ids only: altool’s
--auth-stringwould take the key itself, which would then sit in the process table for any local user to read, so it is never used. - Upload
Outcome - The result of one altool upload, as reported to callers.
Enums§
- Altool
Op - Which altool operation to run against the package: the pre-flight
--validate-appor 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 fromupload_packageso the exact command line is testable and--dry-runcan print it. - upload_
package - Run
xcrun altool --upload-packageand report what happened. - validate_
app - Run
xcrun altool --validate-appand report what happened. - validate_
package - Check the package before spending minutes in altool on it.