| name | asc-publish |
| description | Archive, build, and upload IngrediCheck to App Store Connect. Use to publish a new build for TestFlight or App Store. |
| argument-hint | ["--skip-upload"] |
| allowed-tools | ["Bash(*)"] |
Publish to App Store Connect
Archive, create IPA, and upload to App Store Connect.
Arguments: $ARGUMENTS
- (none): Full build and upload
--skip-upload: Build only, don't upload
Quick Start
.claude/skills/asc-publish/scripts/publish_appstore.sh
SKIP_UPLOAD=1 .claude/skills/asc-publish/scripts/publish_appstore.sh
What It Does
- Queries App Store Connect for latest build number
- Archives with
xcodebuild archive using build number + 1
- Creates IPA from archive
- Uploads via
iTMSTransporter
No local project file changes needed! Build number is determined from ASC and passed to xcodebuild at build time.
Prerequisites
1. Transporter App
Install from Mac App Store: Transporter
2. Distribution Certificate
- Open Xcode → Settings → Accounts
- Select Apple ID → Manage Certificates
- Create "Apple Distribution" certificate
3. App Store Connect API Key
- Go to App Store Connect API Keys
- Create a new key with "App Manager" access
- Download the
.p8 file (only available once!)
- Note the Key ID and Issuer ID
4. Configure Credentials
Automatic (recommended): If you've already run asc auth login, credentials are stored in the macOS Keychain. The script auto-resolves them using the default_key_name from .asc/config.json. No extra setup needed.
Manual (fallback): Create .asc/publish.env:
mkdir -p .asc
cat > .asc/publish.env << 'EOF'
APP_STORE_CONNECT_API_KEY=YOUR_KEY_ID
APP_STORE_CONNECT_API_ISSUER=YOUR_ISSUER_ID
APP_STORE_CONNECT_API_PRIVATE_KEY_PATH=./AuthKey_YOUR_KEY_ID.p8
APP_STORE_CONNECT_API_KEY_TYPE=individual
EOF
Copy your .p8 key file to .asc/:
cp ~/Downloads/AuthKey_XXXXX.p8 .asc/
Worktree Support
The script works from git worktrees automatically:
- Falls back to the main worktree for
.asc/config.json and .asc/publish.env
- Auto-resolves credentials from
asc CLI keychain if no publish.env exists
Usage
Full Build & Upload
.claude/skills/asc-publish/scripts/publish_appstore.sh
Build Only (Test)
SKIP_UPLOAD=1 .claude/skills/asc-publish/scripts/publish_appstore.sh
Output
Using team ID: 58MYNHGN72
Incrementing build number...
Build number set to: 15
Archiving IngrediCheck...
Creating IPA from archive...
IPA created at build/AppStoreExport/IngrediCheck.ipa
Uploading IPA via iTMSTransporter...
=========================================
Upload complete!
Build number: 15
Check App Store Connect for build status.
=========================================
After Upload
Once uploaded, the build will:
- Process in App Store Connect (few minutes)
- Appear in TestFlight
- Be available for internal testers immediately
- Require Beta App Review for external testers (if not already approved)
Check status with: /asc-builds
Troubleshooting
| Error | Solution |
|---|
| "Transporter CLI not found" | Install Transporter from Mac App Store |
| "Unable to detect DEVELOPMENT_TEAM" | Set APPLE_TEAM_ID=58MYNHGN72 in .asc/publish.env |
| "Private key file not found" | Check .p8 file path in .asc/publish.env |
| "Authentication credentials invalid" | Verify Key ID and Issuer ID |
Config
| Variable | Description |
|---|
APP_STORE_CONNECT_API_KEY | API Key ID from App Store Connect |
APP_STORE_CONNECT_API_ISSUER | Issuer ID from App Store Connect |
APP_STORE_CONNECT_API_PRIVATE_KEY_PATH | Path to .p8 file |
APP_STORE_CONNECT_API_KEY_TYPE | individual or team |
APPLE_TEAM_ID | (optional) Override team ID |