Guides

Your first TestFlight build from Windows

Last updated 2 December 2026

Every step from a Flutter project on a Windows PC to a build your testers can install from TestFlight, in the order Apple needs it. You never touch a Mac: the Apple side happens in a browser and a terminal, and the build and upload happen on MacBuildCloud.

People who build iOS apps from Windows rarely get stuck on Flutter. They get stuck on Apple: which page has which file, what has to exist before what, and why a build fails with a message that does not mention the real problem. The examples use Flutter; for a native Xcode project, the build commands in step 9 are in Code signing & TestFlight and everything else is the same.

00What you need

You end up with three files and two IDs from Apple. Steps 1–6 collect them; steps 7–10 hand them to us and run the build.

Two Apple websites are involved, and they are easy to mix up:

  • developer.apple.com → Account → Certificates, Identifiers & Profiles: the App ID, the certificate and the provisioning profile.
  • appstoreconnect.apple.com: the app record, the API key and TestFlight.

If you belong to more than one team, check the team selector at the top right of both sites before anything else. Every list is per team and looks empty on the wrong one. There is a map of both sites in Code signing & TestFlight.

01Pick a bundle ID and put it in the project

Choose a reverse-domain ID such as com.yourname.yourapp. It cannot be changed after the first upload.

Without Xcode, open ios/Runner.xcodeproj/project.pbxproj in any text editor and search for PRODUCT_BUNDLE_IDENTIFIER. The Runner target has three entries (Debug, Release and Profile): change all three to your ID. The entries ending in .RunnerTests belong to the test target; give them your ID followed by .RunnerTests.

02Register the App ID

On developer.apple.com, open Certificates, Identifiers & Profiles → Identifiers → + → App IDs → App. Enter the bundle ID from step 1 as an explicit ID, not a wildcard, and tick any capabilities the app uses, such as Push Notifications.

03Create the app record

On appstoreconnect.apple.com, open Apps → + → New App. Choose iOS, a name, a primary language, your bundle ID from the list, and any SKU (it is only for you). If your bundle ID is not in the list, step 2 did not save, or you are on the wrong team.

04Make a distribution certificate on Windows

Apple's instructions assume Keychain Access on a Mac. OpenSSL does the same job. In Git Bash, make a private key and a certificate request:

openssl req -new -newkey rsa:2048 -nodes \
  -keyout ios_distribution.key \
  -out ios_distribution.csr \
  -subj "/emailAddress=you@example.com/CN=Your Name/C=US"

Keep ios_distribution.key safe. Without it, the certificate Apple gives you is useless.

On developer.apple.com, open Certificates → + → Apple Distribution, upload ios_distribution.csr and download the .cer. Then put the key and the certificate into one .p12:

openssl x509 -inform DER -in distribution.cer -out distribution.pem

openssl pkcs12 -export \
  -inkey ios_distribution.key \
  -in distribution.pem \
  -out distribution.p12

The last command asks you to set a password. You will type it again in step 7. Other guides tell you to add -legacy here, because recent OpenSSL writes a file that older macOS rejects with a misleading wrong password? error. On MacBuildCloud you do not need it: we convert the file when you upload it, without changing the key or the certificate. Adding it does no harm either.

Apple limits how many distribution certificates a team can have. Make one, keep the .p12 and its password somewhere safe, and reuse it for every build.

05Create the provisioning profile

On developer.apple.com, open Profiles → + → Distribution → App Store Connect. Pick your App ID, then the certificate from step 4, give the profile a name, and download the .mobileprovision file. Write the name down: step 8 needs it exactly as you typed it.

06Create an App Store Connect API key

On appstoreconnect.apple.com, open Users and Access → Integrations → App Store Connect API, and click +. Name it MacBuildCloud and give it the App Manager role. A key with the Developer role is accepted when you create it and rejected at upload, at the very end of a build.

Note three things from that page:

  • the Issuer ID, at the top of the page;
  • the Key ID, in the key's row;
  • the .p8 file. Apple lets you download it once. Keep it.

07Add the three secrets on MacBuildCloud

On your dashboard, open Secrets. Each upload is one pass through the Add or replace form: give it a Name, pick the Kind, fill in what that kind asks for, and press Save.

Name (suggested)KindFill in
APPLE_DIST_CERT Signing certificate (.p12) File: distribution.p12 from step 4. Certificate password: the password you set there.
APPSTORE_PROFILE Provisioning profile (.mobileprovision) File: the .mobileprovision from step 5.
ASC_KEY App Store Connect key (.p8) File: the .p8 from step 6. Key ID and Issuer ID: the two IDs from the same page.

A name starts with a letter and uses only letters, digits, _ and -. You can choose your own, but the config in step 9 uses these three, so keeping them saves an edit. Saving a certificate with the wrong password fails right there, not halfway through a build.

Secrets are encrypted at rest and only decrypted onto the machine running your build, which is destroyed afterwards. We never write to your Apple Developer account: no new certificates, no profile changes, no device registration.

08Add ExportOptions.plist

Create ios/ExportOptions.plist. It is plain text, so any editor works:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>method</key>
  <string>app-store-connect</string>
  <key>teamID</key>
  <string>YOURTEAMID</string>
  <key>signingStyle</key>
  <string>manual</string>
  <key>signingCertificate</key>
  <string>Apple Distribution</string>
  <key>provisioningProfiles</key>
  <dict>
    <key>com.yourname.yourapp</key>
    <string>Your Profile Name</string>
  </dict>
</dict>
</plist>

Change three values. teamID is the 10-character Team ID under Membership details on developer.apple.com. The key under provisioningProfiles is your bundle ID, and its value is the profile's name from step 5, as Apple shows it — not the file name, and not the secret name from step 7.

While you are in ios/: if your app only uses standard HTTPS, add this inside the main <dict> of ios/Runner/Info.plist, so App Store Connect stops asking the encryption question for every build:

<key>ITSAppUsesNonExemptEncryption</key>
<false/>

09Tell us how to build and upload

Add .macbuildcloud.yml to the root of the repository:

signing:
  certificate: APPLE_DIST_CERT
  profile: APPSTORE_PROFILE

secrets:
  - ASC_KEY

script:
  - flutter pub get
  - flutter build ipa --release --no-codesign --build-number=$MBC_BUILD_NUMBER
  - xcodebuild -exportArchive \
      -archivePath build/ios/archive/Runner.xcarchive \
      -exportOptionsPlist ios/ExportOptions.plist \
      -exportPath build/ipa
  - xcrun altool --upload-app -t ios \
      -f "$(ls build/ipa/*.ipa | head -1)" \
      --apiKey "$ASC_KEY_ID" --apiIssuer "$ASC_ISSUER_ID"

artifacts:
  - build/ipa/*.ipa

What each part does:

Our Flutter example repository has this file, plus an Android build in the same run, as ci/testflight.macbuildcloud.yml, next to a template ios/ExportOptions.plist.

10Run it and read the result

Push the two files. A repository connected through the GitHub app builds on every push; for one added by name, open Repositories and press Build.

The build page streams the log live. Near the top, look for signing certificate installed, 1 provisioning profile installed and App Store Connect key installed. If one of those is missing, the problem is in step 7 or the signing section, not in your app. The last lines come from altool: if Apple refused the upload, its reason is there, and the build fails. The signed .ipa also appears under Artifacts on the build page, ready to download.

The first upload of an app usually needs one more thing from you: in App Store Connect, on the build, answer the export compliance question if you did not add the Info.plist key from step 8. Nothing automated can answer it for you.

11Find it in TestFlight

On appstoreconnect.apple.com, open Apps → your app → TestFlight. The build shows as Processing for a few minutes, then becomes installable.

  • Internal testers are people on your App Store Connect team, up to 100 of them. They can install it straight away, with no review.
  • External testers need Beta App Review, but only for the first build you add to an external group.

Testers install the TestFlight app on their iPhone and accept the invitation.

12Where it usually breaks

What you seeWhat it usually means
Your bundle ID is not in the New App list The App ID from step 2 is missing, is a wildcard, or is on another team.
Saving the certificate secret fails The password does not open the .p12. It is the one you set in the last OpenSSL command, not your Apple ID password.
No signing certificate “iOS Distribution” found The .p12 has no private key in it, or the certificate has expired.
No profiles for ‘com.…’ were found The bundle ID in the project, the profile and ExportOptions.plist do not all match, or an app extension needs its own profile (list it under profile, separated by commas).
Provisioning profile doesn't include signing certificate The profile was made with a different certificate. Make the profile again with this one and replace the secret.
Could not read the provisioning profile Ours. The file uploaded as the profile is not a .mobileprovision.
The upload is rejected for the key's permissions The API key's role is below App Manager. Make a new key and replace the ASC_KEY secret.
The upload is rejected for the build number That number was used before. Use $MBC_BUILD_NUMBER as in step 9.

More messages and their fixes are in Code signing & TestFlight and Common errors.

13Checklist


Something here wrong or missing? Tell us — we read every message, and documentation fixes go out the same day.