Home/Without a Mac/How do I build an iOS ipa for a Capacitor or Ionic app without a Mac?

How do I build an iOS ipa for a Capacitor or Ionic app without a Mac?

Updated · airankrush

The short answer

Short answer: front-end code, the web build and Android packages can all be done on Windows. Capacitor's official documentation states that building iOS apps requires macOS. Compiling, signing and exporting the ipa after cap sync has to happen on a Mac.

Which steps require macOS

What cannot leave macOS

  • Capacitor's environment setup docs say it in so many words: building iOS apps requires macOS. The docs mention that cloud build services can be used when you have no Mac, but still recommend local tooling.
  • The native iOS project is configured and managed through Xcode. Under the hood, npx cap build ios calls xcodebuild to archive and export.

What you can finish on Windows or Linux

  • All front-end development and npm run build.
  • Syncing, debugging and packaging for the Android platform.
  • Platform-independent settings in capacitor.config, such as appId, appName and webDir.

In other words, the Mac only handles the stretch of wrapping the already-built web bundle in the native shell and signing it. That is also the kind of use where renting a remote Mac by the month makes financial sense.

How to do it on a remote Mac

  1. Set up the environment on the remote Mac

    Install Xcode and open it once, then run xcode-select --install to install the command line tools. Install Node.js. Capacitor has minimum versions for both Xcode and Node, and they change with each major release, so follow the environment setup docs.

    For dependency management, the docs say Capacitor 8 uses Swift Package Manager by default and CocoaPods has become optional. If your project was created earlier with CocoaPods, you still need to install it: brew install cocoapods.

  2. Pull the code and build the web part

    After cloning the repository, run npm install and your framework's build command (for example npm run build). The directory webDir points to must contain the final index.html, otherwise what gets synced in later is an empty shell.

  3. Add or sync the iOS platform

    If the repository has no ios/ directory yet: npm install @capacitor/ios, then npx cap add ios. If it already exists, do not add it again. Just run:

    npx cap sync

    Per the docs, sync does two things: it copies the built web bundle into the native project, and it updates the native dependencies Capacitor uses. Run it again every time you rebuild the web part or add or remove a plugin.

  4. Confirm signing in Xcode

    Run npx cap open ios to open the project, and select your Team on the App target. Details are in Capacitor certificates and signing.

  5. Export the signed ipa

    npx cap build ios

    Per the CLI docs, this command builds the native project and outputs a signed IPA. Common options:

    • --scheme: the scheme to build. The default is App.
    • --xcode-export-method: the export method. The default is app-store-connect. Other values include release-testing, enterprise and debugging.
    • --xcode-team-id and --xcode-signing-style (automatic or manual).

    The docs do not state the output directory, so go by the path printed when the command finishes. You can also skip this command and archive in Xcode instead.

  6. Upload

    Capacitor's publishing docs come down to one sentence: its apps are submitted to the store exactly the same way as any other native app. So uploading follows Apple's flow, using Transporter or Xcode's Organizer. The order is in steps to sign and upload.

FAQ

I changed the front-end code but the installed build is still the old one

The most common cause is rebuilding only the web part without running npx cap sync again, so the native project still holds the files copied in last time. Make "build web, sync, then build the package" a fixed three-step routine.

The release build opens to a white screen or cannot load the page

Check whether a debugging server.url is still in capacitor.config. The docs say it is for live reload and not meant for production. If you ship with it, the app tries to load a development server address users cannot reach. The docs also warn against committing that piece of configuration to version control.

My older project uses CocoaPods. Do I need to migrate to SPM?

It is not required. If you want to migrate, the official npx cap spm-migration-assistant removes the Podfile and workspace and generates the Swift package configuration, after which two more steps have to be done by hand in Xcode. Plugins without an SPM version will not work properly after migration, so check your plugin list before starting. For details, follow the SPM docs.

Can I use a cloud build instead of renting a Mac?

Yes. Capacitor's own docs mention the cloud build route. It saves you setting up an environment, at the cost of only having logs to look at when something fails, with no desktop to work on. For the trade-offs, see remote Mac vs cloud build.

Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support

Back to home · All no-Mac guides