Stop clicking through Xcode's Organizer. Configure an App Store Connect API key once, then say "ship this to TestFlight" in chat — the agent archives, exports, signs, and uploads.
Shipping an iOS build to TestFlight is a sequence of small chores. Archive the app for release. Export an IPA with App Store distribution settings. Validate it against your provisioning profile. Upload to App Store Connect. Wait for processing. Re-check that the build appeared. Every step has its own dialog or command, and every step is the same every time. It is the kind of work humans should not be doing by hand.
Xcode's Organizer makes this slightly less painful by stitching the steps into a wizard, but it's still you driving. You click Distribute, you pick the destination, you wait, you click Next, you wait, you click Upload. If anything fails mid-sequence — a missing capability, a duplicated build number, an expired profile — you start over.
The LingCode agent already has the tools that drive each step (xcodebuild archive, xcodebuild -exportArchive, xcrun altool --upload-app) and the context it needs (your project, your bundle ID, your signing identity in Keychain). What's missing for an end-to-end "ship it" is one credential: an App Store Connect API key it can sign upload requests with. Once you've registered that key, "Upload this build to TestFlight" in chat triggers the entire sequence, streams a phase log, and tells you when the build is ready. This tutorial is the credential setup plus the actual ship turn.
Sign in to App Store Connect with an Account Holder or Admin role. Go to Users and Access → Integrations → App Store Connect API → Team Keys. Click Generate API Key (or use an existing one if you already have one for TestFlight uploads).
Give the key the App Manager role — that's enough for TestFlight uploads and avoids over-granting. Download the .p8 file when prompted. You only get one chance to download it; treat it like any other credential.
Note three values you'll need next: the Issuer ID (shown at the top of the page), the Key ID (next to the key you just made), and the path to the .p8 file.
Open the AI chat panel and say:
Set my App Store Connect API key. Issuer ID is <your-issuer-id>, Key ID is <your-key-id>, p8 is at /Users/me/Downloads/AuthKey_<key-id>.p8
The agent calls the internal set_asc_api_key tool. Your credentials land in the LingCode Keychain under the service LingCode; the .p8 contents are stored, not the file path, so you can delete the original safely.
Before involving the network and Apple, prove the archive works locally. In chat: Archive the app for release. The agent runs xcodebuild archive with your Release configuration, streams the build log into the run console, and reports the archive path.
If this step fails, fix the underlying issue (signing, missing capabilities, broken Info.plist) before moving on. Many uploads die at this step the first time, and notary-service errors are far worse to debug than a local archive failure.
Once the archive succeeds, say:
Upload this build to TestFlight.
The agent calls archive_and_upload_testflight (or its narrower upload-only variant if you already have an archive). Internally it: exports an IPA from the archive with App Store distribution settings → runs xcrun altool --upload-app against App Store Connect → polls for processing → reports the build number you can find in TestFlight.
The agent streams a phase-by-phase log into the run console: Archiving → Exporting IPA → Validating → Uploading → Processing. Each phase is timed. Uploading is the slowest in absolute time (your IPA is gigabytes); Processing can take 5–30 minutes on Apple's side and runs asynchronously.
You can leave the chat tab and the agent will surface a notification when the build is available in TestFlight, or fails processing.
CFBundleVersion. Bump CURRENT_PROJECT_VERSION in your build settings, archive again. (Ask the agent: "Bump build number and re-archive.").entitlements claims. If you suspect an agent edit caused this, see Undo bad AI edits.UIDeviceFamily. Fix in Info.plist and re-archive.