{"id":"5b56ed03-9ffe-4de5-aa7d-eb53eee3e0a3","shortId":"NsGpLJ","kind":"skill","title":"asc-xcode-build","tagline":"Build, archive, export, and manage Xcode version/build numbers with asc and xcodebuild before uploading to App Store Connect. Use when you need to create an IPA or PKG for upload.","description":"# Xcode Build and Export\n\nUse this skill when you need to build an app from source and prepare it for upload to App Store Connect.\n\n## Preconditions\n- Xcode installed and command line tools configured\n- Valid signing identity and provisioning profiles (or automatic signing enabled)\n\n## Manage version and build numbers with `asc`\nBefore archiving, prefer `asc xcode version ...` over manual `pbxproj` edits when you need to inspect or bump app versions.\n\n```bash\nasc xcode version view\nasc xcode version edit --version \"1.3.0\" --build-number \"42\"\nasc xcode version bump --type build\nasc xcode version bump --type patch\n```\n\nNotes:\n- Use `--project-dir \"./MyApp\"` when you are not running from the project root.\n- Use `--target \"App\"` for deterministic reads in multi-target projects.\n- These commands support both legacy `agvtool` projects and modern `MARKETING_VERSION` / `CURRENT_PROJECT_VERSION` setups.\n\n## iOS Build Flow\n\n### 1. Clean and Archive\n```bash\nxcodebuild clean archive \\\n  -scheme \"YourScheme\" \\\n  -configuration Release \\\n  -archivePath /tmp/YourApp.xcarchive \\\n  -destination \"generic/platform=iOS\"\n```\n\n### 2. Export IPA\n```bash\nxcodebuild -exportArchive \\\n  -archivePath /tmp/YourApp.xcarchive \\\n  -exportPath /tmp/YourAppExport \\\n  -exportOptionsPlist ExportOptions.plist \\\n  -allowProvisioningUpdates\n```\n\nA minimal `ExportOptions.plist` for App Store distribution:\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n    <key>method</key>\n    <string>app-store-connect</string>\n    <key>teamID</key>\n    <string>YOUR_TEAM_ID</string>\n</dict>\n</plist>\n```\n\n### 3. Upload with asc\n```bash\nasc builds upload --app \"APP_ID\" --ipa \"/tmp/YourAppExport/YourApp.ipa\"\n```\n\n## macOS Build Flow\n\n### 1. Archive\n```bash\nxcodebuild archive \\\n  -scheme \"YourMacScheme\" \\\n  -configuration Release \\\n  -archivePath /tmp/YourMacApp.xcarchive \\\n  -destination \"generic/platform=macOS\"\n```\n\n### 2. Export PKG\n```bash\nxcodebuild -exportArchive \\\n  -archivePath /tmp/YourMacApp.xcarchive \\\n  -exportPath /tmp/YourMacAppExport \\\n  -exportOptionsPlist ExportOptions.plist \\\n  -allowProvisioningUpdates\n```\n\n### 3. Upload PKG with asc\nmacOS apps export as `.pkg` files. Upload with `asc`:\n```bash\nasc builds upload \\\n  --app \"APP_ID\" \\\n  --pkg \"/tmp/YourMacAppExport/YourApp.pkg\" \\\n  --version \"1.0.0\" \\\n  --build-number \"123\"\n```\n\nNotes:\n- `--pkg` automatically sets platform to `MAC_OS`.\n- For `.pkg` uploads, `--version` and `--build-number` are required (they are not auto-extracted like IPA uploads).\n- Add `--wait` if you want to wait for build processing to complete.\n\n## Build Number Management\n\nEach upload requires a unique build number higher than previously uploaded builds.\n\nIn Xcode project settings:\n- `CURRENT_PROJECT_VERSION` - build number (e.g., \"316\")\n- `MARKETING_VERSION` - version string (e.g., \"2.2.0\")\n\nCheck existing builds:\n```bash\nasc builds list --app \"APP_ID\" --platform IOS --limit 5\n```\n\n## Troubleshooting\n\n### \"No profiles for bundle ID\" during export\n- Add `-allowProvisioningUpdates` flag\n- Verify your Apple ID is logged into Xcode\n\n### Build rejected for missing icon (macOS)\nmacOS requires ICNS format icons with all sizes:\n- 16x16, 32x32, 128x128, 256x256, 512x512 (1x and 2x)\n\n### CFBundleVersion too low\nThe build number must be higher than any previously uploaded build. Increment it with `asc xcode version bump --type build`, or resolve a remote-safe number with `asc builds next-build-number --app \"APP_ID\" --version \"2.2.0\" --platform IOS` and then apply it with `asc xcode version edit --build-number \"NEXT_BUILD\"` before rebuilding.\n\n## Notes\n- Always clean before archive for release builds\n- Use `xcodebuild -showBuildSettings` to verify configuration\n- For submission issues (encryption, content rights), see `asc-submission-health` skill","tags":["asc","xcode","build","app","store","connect","cli","skills","rorkai","agent-skills","ai-skills","app-store-connect"],"capabilities":["skill","source-rorkai","skill-asc-xcode-build","topic-agent-skills","topic-ai-skills","topic-app-store-connect","topic-apple","topic-asc","topic-automation","topic-cicd","topic-cli","topic-devops","topic-ios","topic-macos","topic-testflight"],"categories":["app-store-connect-cli-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/rorkai/app-store-connect-cli-skills/asc-xcode-build","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add rorkai/app-store-connect-cli-skills","source_repo":"https://github.com/rorkai/app-store-connect-cli-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 776 github stars · SKILL.md body (3,916 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T18:53:03.503Z","embedding":null,"createdAt":"2026-04-18T21:56:57.589Z","updatedAt":"2026-05-02T18:53:03.503Z","lastSeenAt":"2026-05-02T18:53:03.503Z","tsv":"'/myapp':136 '/tmp/yourapp.xcarchive':188,199 '/tmp/yourappexport':201 '/tmp/yourappexport/yourapp.ipa':234 '/tmp/yourmacapp.xcarchive':248,259 '/tmp/yourmacappexport':261 '/tmp/yourmacappexport/yourapp.pkg':287 '1':175,238 '1.0.0':289 '1.3.0':114 '123':293 '128x128':414 '16x16':412 '1x':417 '2':192,252 '2.2.0':364,461 '256x256':415 '2x':419 '3':222,265 '316':358 '32x32':413 '42':118 '5':378 '512x512':416 'add':321,387 'agvtool':162 'allowprovisioningupd':204,264,388 'alway':481 'app':20,48,57,102,148,209,215,230,231,271,283,284,372,373,457,458 'app-store-connect':214 'appl':392 'appli':466 'archiv':6,86,178,182,239,242,484 'archivepath':187,198,247,258 'asc':2,14,84,88,105,109,119,125,225,227,269,278,280,369,437,451,469,502 'asc-submission-health':501 'asc-xcode-build':1 'auto':316 'auto-extract':315 'automat':75,296 'bash':104,179,195,226,240,255,279,368 'build':4,5,36,46,81,116,124,173,228,236,281,291,308,329,333,341,347,355,367,370,398,424,433,442,452,455,474,477,487 'build-numb':115,290,307,473 'bump':101,122,128,440 'bundl':383 'cfbundlevers':420 'check':365 'clean':176,181,482 'command':64,158 'complet':332 'configur':67,185,245,493 'connect':22,59,217 'content':498 'creat':28 'current':168,352 'destin':189,249 'determinist':150 'dir':135 'distribut':211 'e.g':357,363 'edit':94,112,472 'enabl':77 'encrypt':497 'exist':366 'export':7,38,193,253,272,386 'exportarch':197,257 'exportoptions.plist':203,207,263 'exportoptionsplist':202,262 'exportpath':200,260 'extract':317 'file':275 'flag':389 'flow':174,237 'format':407 'generic/platform':190,250 'health':504 'higher':343,428 'icn':406 'icon':402,408 'id':221,232,285,374,384,393,459 'ident':70 'increment':434 'inspect':99 'instal':62 'io':172,191,376,463 'ipa':30,194,233,319 'issu':496 'legaci':161 'like':318 'limit':377 'line':65 'list':371 'log':395 'low':422 'mac':300 'maco':235,251,270,403,404 'manag':9,78,335 'manual':92 'market':166,359 'method':213 'minim':206 'miss':401 'modern':165 'multi':154 'multi-target':153 'must':426 'need':26,44,97 'next':454,476 'next-build-numb':453 'note':131,294,480 'number':12,82,117,292,309,334,342,356,425,449,456,475 'os':301 'patch':130 'pbxproj':93 'pkg':32,254,267,274,286,295,303 'platform':298,375,462 'precondit':60 'prefer':87 'prepar':52 'previous':345,431 'process':330 'profil':73,381 'project':134,144,156,163,169,350,353 'project-dir':133 'provis':72 'read':151 'rebuild':479 'reject':399 'releas':186,246,486 'remot':447 'remote-saf':446 'requir':311,338,405 'resolv':444 'right':499 'root':145 'run':141 'safe':448 'scheme':183,243 'see':500 'set':297,351 'setup':171 'showbuildset':490 'sign':69,76 'size':411 'skill':41,505 'skill-asc-xcode-build' 'sourc':50 'source-rorkai' 'store':21,58,210,216 'string':362 'submiss':495,503 'support':159 'target':147,155 'team':220 'teamid':218 'tool':66 'topic-agent-skills' 'topic-ai-skills' 'topic-app-store-connect' 'topic-apple' 'topic-asc' 'topic-automation' 'topic-cicd' 'topic-cli' 'topic-devops' 'topic-ios' 'topic-macos' 'topic-testflight' 'troubleshoot':379 'type':123,129,441 'uniqu':340 'upload':18,34,55,223,229,266,276,282,304,320,337,346,432 'use':23,39,132,146,488 'valid':68 'verifi':390,492 'version':79,90,103,107,111,113,121,127,167,170,288,305,354,360,361,439,460,471 'version/build':11 'view':108 'wait':322,327 'want':325 'xcode':3,10,35,61,89,106,110,120,126,349,397,438,470 'xcodebuild':16,180,196,241,256,489 'xml':212 'yourmacschem':244 'yourschem':184","prices":[{"id":"1b4e6c8c-7abc-49b7-b580-78726508bcd9","listingId":"5b56ed03-9ffe-4de5-aa7d-eb53eee3e0a3","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"rorkai","category":"app-store-connect-cli-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:56:57.589Z"}],"sources":[{"listingId":"5b56ed03-9ffe-4de5-aa7d-eb53eee3e0a3","source":"github","sourceId":"rorkai/app-store-connect-cli-skills/asc-xcode-build","sourceUrl":"https://github.com/rorkai/app-store-connect-cli-skills/tree/main/skills/asc-xcode-build","isPrimary":false,"firstSeenAt":"2026-04-18T21:56:57.589Z","lastSeenAt":"2026-05-02T18:53:03.503Z"}],"details":{"listingId":"5b56ed03-9ffe-4de5-aa7d-eb53eee3e0a3","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"rorkai","slug":"asc-xcode-build","github":{"repo":"rorkai/app-store-connect-cli-skills","stars":776,"topics":["agent-skills","ai-skills","app-store-connect","apple","asc","automation","cicd","cli","devops","ios","macos","testflight","xcode"],"license":"mit","html_url":"https://github.com/rorkai/app-store-connect-cli-skills","pushed_at":"2026-04-24T08:59:37Z","description":"Skills to automate app store deployed and everything related to it using the asc cli","skill_md_sha":"d583e0b866a32d4227d29aa7a6770a55de330121","skill_md_path":"skills/asc-xcode-build/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/rorkai/app-store-connect-cli-skills/tree/main/skills/asc-xcode-build"},"layout":"multi","source":"github","category":"app-store-connect-cli-skills","frontmatter":{"name":"asc-xcode-build","description":"Build, archive, export, and manage Xcode version/build numbers with asc and xcodebuild before uploading to App Store Connect. Use when you need to create an IPA or PKG for upload."},"skills_sh_url":"https://skills.sh/rorkai/app-store-connect-cli-skills/asc-xcode-build"},"updatedAt":"2026-05-02T18:53:03.503Z"}}