Toolkit: xcbeautify & the Store APIs
The Apple side and the two stores have their own tool belts. This page maps them by job; everything Apple-specific is macOS-only and non-run here.
Making xcodebuild readable
xcodebuild prints every compiler invocation in full, tens of thousands of lines for a real app. On CI you want the errors, warnings and test results, plus the full log kept as an artifact.
| Tool | What it does |
|---|---|
| xcbeautify | a fast formatter (Swift) for xcodebuild output; --renderer github-actions turns errors into annotations on the pull request, --report junit writes JUnit XML |
| xcpretty | the older Ruby formatter; still in many Fastfiles |
xcrun xcresulttool |
reads .xcresult bundles: test summaries, failures, attachments, coverage (xcrun xccov view --report) |
xcodebuild -showBuildSettings -json |
resolved settings for scripts (xcconfig) |
xcrun simctl |
create, boot, erase and list simulators |
xcrun agvtool |
read/set CURRENT_PROJECT_VERSION and MARKETING_VERSION |
set -o pipefail
xcodebuild test -scheme Hello -destination 'platform=iOS Simulator,name=iPhone 16' \
-resultBundlePath build/Tests.xcresult 2>&1 \
| tee build/xcodebuild.log \
| xcbeautify --renderer github-actions --report junit --report-path build/reportstee keeps the raw log for when the formatter hides something, pipefail keeps the exit code honest, and the JUnit report feeds the same test reporters as the Android job.
Other Apple tools
| Tool | For |
|---|---|
| Instruments / Xcode's build timeline (Product → Perform Action → Build With Timing Summary) | where build time goes; -showBuildTimingSummary on the command line |
Transporter app / xcrun altool --upload-app |
uploading an .ipa without Xcode (Fastlane's pilot uses the API instead) |
| Xcode Cloud | Apple's hosted CI with built-in signing |
| XcodeGen / Tuist | generate .xcodeproj from YAML/Swift manifests, so project.pbxproj stops being a merge-conflict magnet |
| SwiftLint, SwiftFormat | linting and formatting, as build phases or CI steps |
The store APIs
Both stores expose release automation through REST APIs. Fastlane wraps them, but knowing what's underneath helps when a lane fails with an HTTP error.
| Google Play Developer API (Android Publisher) | App Store Connect API | |
|---|---|---|
| Auth | Google service account (OAuth 2.0, JSON key) | JWT signed with your .p8 key (ES256), key ID + issuer ID, valid ≤ 20 minutes |
| Upload a build | edits: open an edit, upload the AAB, assign it to a track, commit the edit | builds are uploaded with Transporter/altool, then managed via the API (TestFlight groups, review submission) |
| Tracks / testing | internal, closed, open, production; staged rollouts | TestFlight internal/external groups; phased release for App Store versions |
| Metadata | store listing texts, images per language | app info, version metadata, screenshots |
| Reports | Play Console reporting (separate APIs for vitals, reviews) | sales and finance reports, analytics |
The Play API's edit is a transaction: every change in it becomes visible together on commit, or not at all, which is why supply's uploads are all-or-nothing.
A runnable model: the App Store Connect token
An App Store Connect request carries Authorization: Bearer <JWT>. The token is three base64url parts: header, payload and an ES256 signature made with the .p8 key. Here are the first two, built the way the API documents them (the signature needs your private key and isn't deterministic, so it's left out):
import base64, json
def b64url(obj):
raw = json.dumps(obj, separators=(",", ":")).encode()
return base64.urlsafe_b64encode(raw).rstrip(b"=").decode()
key_id, issuer_id = "2X9R4HXF34", "57246542-96fe-1a63-e053-0824d011072a"
issued_at = 1767225600 # 2026-01-01T00:00:00Z, fixed for the example
header = {"alg": "ES256", "kid": key_id, "typ": "JWT"}
payload = {"iss": issuer_id, "iat": issued_at, "exp": issued_at + 20 * 60, "aud": "appstoreconnect-v1"}
print("header: ", header)
print("payload:", payload)
print("token: ", b64url(header) + "." + b64url(payload) + ".<ES256 signature>")
print("lifetime:", (payload["exp"] - payload["iat"]) // 60, "minutes (the API rejects more than 20)")header: {'alg': 'ES256', 'kid': '2X9R4HXF34', 'typ': 'JWT'}
payload: {'iss': '57246542-96fe-1a63-e053-0824d011072a', 'iat': 1767225600, 'exp': 1767226800, 'aud': 'appstoreconnect-v1'}
token: eyJhbGciOiJFUzI1NiIsImtpZCI6IjJYOVI0SFhGMzQiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiI1NzI0NjU0Mi05NmZlLTFhNjMtZTA1My0wODI0ZDAxMTA3MmEiLCJpYXQiOjE3NjcyMjU2MDAsImV4cCI6MTc2NzIyNjgwMCwiYXVkIjoiYXBwc3RvcmVjb25uZWN0LXYxIn0.<ES256 signature>
lifetime: 20 minutes (the API rejects more than 20)
Short-lived tokens are the point: a leaked token expires in minutes, while the .p8 key that signs them stays in your secret store. Revoke the key in App Store Connect if it leaks.
Test yourself
Why pipe xcodebuild through tee build/xcodebuild.log before xcbeautify?
- xcbeautify needs a file
- To keep the raw log as an artifact for problems the formatter hides
- To make the build faster
- It enables code signing
How does the Google Play Developer API make an upload all-or-nothing?
- Retries
- Changes are grouped in an edit that is committed as one transaction
- It uploads twice
- Only staged rollouts are atomic
What signs an App Store Connect API token?
- The distribution certificate
- The team's .p8 API private key (ES256)
- The provisioning profile
- Your Apple ID password