Shipping iOS Apps
If you build iOS apps, the step that usually needs your laptop is the last one: signing the build and uploading it. With a Mac at home running PocketDev, an agent can do that step too. You can fix a bug from your phone and have a TestFlight build waiting by the time you're back at your desk.
signed, uploaded, and ready to test.
This is an optional part of the setup. It only appears when PocketDev runs on a Mac, and it doesn't affect anything else in the app if you skip it.
What a task looks like
Once the Mac is set up, you write tasks the same way as any other:
Fix the crash in the review screen and upload a TestFlight build.
The agent fixes the code, builds and signs the app with Xcode on the Mac, and uploads it to App Store Connect. If your project already has a release script (for example scripts/deploy.py or a fastlane lane), the agent is told to use it. It's also told to ask you before submitting anything for App Review or releasing it to the App Store. Uploading a TestFlight build is fine when the task asks for it.
What you need
- A Mac running the PocketDev agent. See Running on a Home Server for installing it and reaching it from your phone with Tailscale. Building and signing iOS apps needs macOS, so this doesn't work on a Linux server.
- A paid Apple Developer Program membership.
- An App Store Connect API key, or an account with the Account Holder or Admin role so PocketDev can create one for you.
- Room on the Mac's disk for Xcode and the iOS platform. They're large, so check the free space first, and expect the download to take a while.
Setting it up
In the PocketDev app, open Settings → Workspace Tools and find the App Store section. It checks what's already on the Mac and skips the steps you don't need. Anything that needs a password runs in the app's terminal on the Mac, and you type the password into a secure prompt on your phone.

1. Xcode
PocketDev looks for Xcode in /Applications and checks that it's the selected version, that its license is accepted, and that the iOS platform is installed. If Xcode isn't there yet, you can install it in one of two ways:
- From the Mac App Store. The Mac needs to be signed in to the App Store, and Apple may ask you to confirm on the Mac itself.
- Directly from developer.apple.com, using the open-source xcodes tool. You enter your Apple Account password and a two-factor code in the terminal. The saved password is removed again when the install finishes.
A final step selects Xcode and accepts its license (this needs your Mac's password). A beta Xcode can't be used here: App Store Connect rejects builds made with one. Install the release version next to the beta if you need both.


2. The asc command-line tool
Uploads and App Store Connect tasks go through asc, an open-source, MIT-licensed command-line tool for the App Store Connect API. It's a community project, not an Apple product. PocketDev installs it into ~/.local/bin with its official install script.
asc sends pseudonymous usage statistics by default (which commands ran, not your apps, keys or files). The setup has a switch to turn that off.

3. Connect your Apple account
Agents never use your Apple Account directly. They use an App Store Connect API key that belongs to this Mac. You have two options:
- Create a key for me. Enter your Apple Account email. asc signs in on the Mac and asks for your password and a two-factor code, which you type into the secure prompt on your phone. It then creates a key called PocketDev <your Mac's name> and signs out again. Your password isn't saved by PocketDev or by asc. This needs the Account Holder or Admin role on your team.
- Use an existing key. If you already have an
AuthKey_XXXXXXXXXX.p8file, pick it on your phone and enter the Issuer ID from App Store Connect → Users and Access → Integrations. PocketDev checks the key with Apple before saving it.



You can choose the key's role. Admin is the default because Xcode's automatic signing with an API key needs it. App Manager is more limited and works for uploads, but automatic signing may fail with it.
A few things worth knowing about keys:
- Apple lets you download a key file only once. If you create one by hand, keep a copy.
- Give each Mac its own key, so you can revoke one without breaking the others.
- Apple limits how many distribution certificates a team can have. PocketDev relies on Xcode's automatic signing instead of creating new certificates for each Mac.
4. Verify
The last step checks the key with App Store Connect and lists your apps. If you see them, you're done. PocketDev also adds a short App Store Connect section to the instructions it gives agents (~/.claude/CLAUDE.md), so they know asc is available and when to check with you first.
What's stored where
- The API key file:
~/.asc/keys/AuthKey_<KEY_ID>.p8, readable only by your user. - asc's sign-in: your Mac's login Keychain, under the profile name
pocketdev. - Your Apple Account password: not stored. The sign-in used to create the key is ended as soon as the key exists.
Every agent task on that Mac can use the key, the same way a CI machine can. Pick the role with that in mind.
Undoing it
- Revoke the key in App Store Connect → Users and Access → Integrations. This is what actually stops it from working.
- On the Mac, remove it from asc:
asc auth logout --name pocketdev --confirm - Delete the key file:
rm ~/.asc/keys/AuthKey_<KEY_ID>.p8
Xcode and asc can stay installed. They do nothing on their own.
Troubleshooting
- "Account Holder or Admin access is required": your Apple Account doesn't have that role on the team. Ask the Account Holder to create a key and use Use an existing key.
- Xcode isn't selected: the Mac is still using the Command Line Tools. Run the finish step again, or
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer. - The two-factor code doesn't arrive: without a trusted Apple device nearby, run the key step in the terminal with
--two-factor-method smsto get the code by text message. - It stopped working after a reboot: the agent and the Keychain only become available once someone logs in to the Mac. Turn on automatic login. If FileVault is on, automatic login is not possible, so someone has to log in after each restart. See keeping a Mac mini always on.
- The key is rejected: it may have been revoked or its role changed. Create or import a new one.