Docs
Use AppForShare with Codemagic
Keep Codemagic for builds. This guide shows three ways to send Codemagic builds to AppForShare, how to sign them so iPhones can install from a link, how new iPhones get into the next build, and where the store steps fit.
Step 1, Every plan
Keep Codemagic, pick the signing
Nothing about how you build changes. Codemagic keeps building and signing on its machines. AppForShare takes the finished file and adds an install page, links that stay, iPhone onboarding, feedback, the readiness check and the store steps.
For an install link on iPhones, sign the build ad hoc (or development, or enterprise): ios_signing with distribution_type: ad_hoc and your bundle_identifier. For a store upload from AppForShare, use app_store instead; that build cannot be installed from a link. On Android, build an APK, or keep the .aab and AppForShare turns it into one APK testers install.
environment: groups: [appforshare] flutter: stable ios_signing: distribution_type: ad_hoc bundle_identifier: io.acme.notesStep 2, Pro and Team
Way 1: one publishing script in codemagic.yaml
Add APPFORSHARE_TOKEN (made in AppForShare under Dashboard, Settings) as a Secure environment variable in a group such as appforshare, and import the group in the workflow.
Codemagic runs publishing scripts even when the build failed. Make touch ~/SUCCESS the last build script and upload only when the file is there; otherwise a failed build tries to upload a missing or older file. For iOS, xcode-project use-profiles writes /Users/builder/export_options.plist and flutter build ipa exports with it. Do not add --export-method to that command.
Upload from Codemagic: Android and iOS snippetsworkflows: ios-adhoc: name: iOS ad hoc environment: groups: [appforshare] flutter: stable ios_signing: distribution_type: ad_hoc bundle_identifier: io.acme.notes scripts: - name: Use profiles script: xcode-project use-profiles - name: Build ipa script: flutter build ipa --release --export-options-plist=/Users/builder/export_options.plist - name: Mark success script: touch ~/SUCCESS artifacts: - build/ios/ipa/*.ipa publishing: scripts: - name: Share with testers script: | if [ -f ~/SUCCESS ]; then npx --yes appforshare upload build/ios/ipa \ --notes "$(git log -1 --pretty=%B)" --channel beta fiStep 3, Pro and Team
Shorter, with CLI 1.20.0 or later
On Codemagic the CLI fills the release notes from the last commit with the build number, branch and short commit, saves the Codemagic build page on the build, and with no file picks the newest .ipa, .apk or .aab from CM_BUILD_OUTPUT_DIR or the Flutter output folders. --if-success skips the upload when ~/SUCCESS is missing.
publishing: scripts: - name: Share with testers script: npx --yes appforshare@latest upload --if-success --channel betaStep 4, Pro and Team
Way 2: the Workflow Editor (Flutter)
The Workflow Editor is for Flutter apps; other apps use codemagic.yaml. Add APPFORSHARE_TOKEN as an environment variable and a post-publish script. In the Workflow Editor, $CM_BUILD_STEP_STATUS tells the script whether the build passed, and upload --if-success reads it for you.
Run npx appforshare init once in the repository and commit appforshare.config.json, so the script needs no paths.
if [ "$CM_BUILD_STEP_STATUS" = "success" ]; then npx --yes appforshare upload --channel beta fiStep 5, Pro and Team
Way 3: Connect Codemagic (nothing in the workflow)
An Owner or Admin pastes a Codemagic API token once for the workspace and maps a Codemagic app and workflow to an AppForShare project and channel. Codemagic documents no outgoing build webhooks, so AppForShare checks for finished builds every 5 minutes and imports one file per build and platform: the .ipa, or for Android the .apk (the .aab when there is no .apk), with release notes from the build or the commit.
The token is stored encrypted and never shown again; disconnecting deletes it. It acts with your Codemagic role, and AppForShare only reads: it never starts, cancels or changes anything in Codemagic. Builds that finished before the mapping are not imported.
printf %s "$CM_API_TOKEN" | npx appforshare codemagic connect --token-stdin \ --app <codemagic app id> --workflow <workflow id> --project <project id> --channel Beta npx appforshare codemagic statusStep 6, Pro and Team, hands free on Team
iPhones
Turn on the onboarding link of the iOS project and send it to testers. They enter an email and install a profile on the iPhone, and the device lands in your devices. An Admin registers it on Apple with your App Store Connect API key in one click, with no Apple ID sign in.
Then run the Codemagic workflow again: xcode-project use-profiles fetches an ad hoc profile for the bundle id, and the new build includes the device. When that build is uploaded, the tester gets one email with the install link. Hands free (Team) registers the device, remakes the profile and starts a build for you, but that build is a GitHub build AppForShare set up on your own GitHub Actions, not a Codemagic build.
iOS device registrationStep 7, Free, Pro and Team as noted
How Codemagic sharing maps to AppForShare
A Codemagic artifact link is a build link here, with an install page instead of a file download (every plan). A build dashboard maps to a channel link that always opens the newest build (Pro and Team), or to the build history page, an opt in public page with the last 20 builds of a project and an Install button each (Pro and Team).
A Codemagic tester group maps to a tester group (Team), with no 20 tester cap and install status per tester. The email Codemagic sends after a build maps to the tester email on Team, or to emailing the install link from the build page (Pro). Links do not stop after 24 hours: Free links live 7 days, Pro and Team links while you subscribe.
Beta and Live channelsStep 8, Pro and Team, some on Team
Store steps
Keep the app_store_connect and google_play publishing in codemagic.yaml if it works for you. Or build with app_store signing (or an .aab), upload the file to AppForShare and let an Admin send it to TestFlight with What to Test, or to a Google Play testing track with a release name and in-app update priority (Pro). On Team the same confirm can give the build to TestFlight groups and submit it for beta review once Apple has processed it, or save a Google Play production draft.
After that, use the listing editor, the App Store review card, the Google Play releases page with rollout plans (Team) and the reviews inbox. Nothing is sent to a store unless a person asks for it.
Send store builds to TestFlight and Google PlayStep 9, Pro and Team
Pull request comments
Add a GitHub token that can write pull requests as a Secure variable named GITHUB_TOKEN and pass --pr-comment. On a pull request build the CLI reads CM_PULL_REQUEST_NUMBER and CM_REPO_SLUG and keeps one comment with the install links, QR codes and readiness result. GitHub repositories only.
npx --yes appforshare@latest upload --if-success --channel beta --pr-commentStep 10, Pro and Team
AI tools
Codemagic publishes agent skills for setting up codemagic.yaml. Connect the AppForShare MCP server to the same assistant for install links, testers, readiness and store status. It uses OAuth sign in and works in Claude, Cursor, Codex or VS Code.
MCP server
Questions
- Do I have to stop using Codemagic?
- No. Codemagic keeps building, signing and, if you like, publishing. AppForShare is the tester and store release layer after the build.
- Which way should I pick?
- A publishing script if you use codemagic.yaml. A post-publish script if you use the Workflow Editor. Connect Codemagic if you want nothing in the workflow at all.
- Do I need a paid Codemagic team?
- No. A personal Codemagic account and an AppForShare upload token (Pro and Team) are enough; testers never need a Codemagic account.
- Why does the upload need the ~/SUCCESS check?
- Codemagic runs publishing scripts even after a failed build. Without the check, the script runs on a failed build and fails on a missing file or sends an older one.
- Can testers install an App Store signed build?
- No. App Store and TestFlight builds cannot be installed from a link. Use ad hoc, development or enterprise signing for testers, and send the App Store build to TestFlight.
Weighing the two first? Read AppForShare vs Codemagic. For every upload option, see Upload from CI.