Guide

Build a Capacitor iOS app when you work on Windows

Capacitor wraps your web app in a native shell. On Windows you can build the web app and the Android app. The iOS app needs Xcode, which only runs on macOS. We tested where that line falls with Capacitor 8.5.3 on October 19, 2026. It falls later than most people think.

What works on Windows

We ran these steps on GitHub's Windows Server 2025 runner with Node 22. Capacitor's docs ask for Node 22 or newer. Every step passed.

npm init @capacitor/app@latest capdemo -- --name CapDemo --app-id com.example.capdemo
cd capdemo
npm install
npm run build
npm i @capacitor/android @capacitor/ios
npx cap add android
npx cap add ios
npx cap sync ios

The Android debug build also worked there with JDK 21. gradlew.bat assembleDebug took 6 minutes 33 seconds on a cold runner. It made an 8.2 MB app-debug.apk.

The surprise is npx cap add ios. It ran on Windows in under a second and wrote a full Xcode project. This is what it printed:

√ Adding native Xcode project in ios in 47.04ms
[info] All Capacitor plugins have a Package.swift file and will be included in Package.swift
[info] Writing Package.swift
[success] ios platform added!

Swift Package Manager, not CocoaPods

Capacitor 8 projects use Swift Package Manager by default. The docs recommend it and say CocoaPods was the default before Capacitor 8. Our new project had no Podfile. It had ios/App/App.xcodeproj and a CapApp-SPM package that points at your plugins in node_modules.

That is why the iOS steps work on Windows now. There is no pod install to run. If your project still uses CocoaPods, pod install needs macOS. We did not test a CocoaPods project on Windows. To move to SPM, the docs offer npx cap spm-migration-assistant.

What still needs a Mac

  • xcodebuild and Xcode. Capacitor 8 needs Xcode 26.0 or newer, and Xcode only runs on macOS.
  • npx cap open ios and npx cap run ios. Both hand the project to Xcode or the Simulator.
  • The iOS Simulator. It ships inside Xcode.
  • Signing, archive and upload. See publishing without a Mac for that part.

The Windows to Mac handoff we tested

We committed the Windows project to git and moved it to a Mac runner. The ios folder's own .gitignore leaves out the copied web files and the generated config. So the Mac rebuilds them before Xcode runs:

npm ci
npm run build
npx cap sync ios
xcodebuild -project ios/App/App.xcodeproj -scheme App \
  -configuration Debug -sdk iphonesimulator \
  -destination 'generic/platform=iOS Simulator' \
  -derivedDataPath build build

The build took 36 seconds with Xcode 26.6. On the first run, Xcode fetched capacitor-swift-pm 8.5.3 from GitHub. Then we installed the app in the iPhone 17 Pro simulator and opened it. The Capacitor welcome screen came up.

xcrun simctl install booted build/Build/Products/Debug-iphonesimulator/App.app
xcrun simctl launch booted com.example.capdemo

Capacitor's iOS page still says to open App.xcworkspace. An SPM project has none, so open ios/App/App.xcodeproj instead.

A device build with signing turned off also passed in 17 seconds. Add CODE_SIGNING_ALLOWED=NO and use -sdk iphoneos. To ship, open the project in Xcode, pick your team under Signing and Capabilities, then choose Product, then Archive.

What about Ionic Appflow?

Appflow builds iOS apps in Ionic's cloud, and its page still says so. On February 11, 2025, Ionic stopped new sales of Appflow. Current users keep access through December 31, 2027. If you are not already a customer, plan on another route.

Renting the Mac for one step

A MacRun day pass is a dedicated M6 Mac mini for $15, or $59 for a week. Xcode 27.1 and the iOS 27.1 simulator are installed. Node is not. You have admin rights and Homebrew, so you install the Node version you use. You connect over SSH and screen sharing from Windows. The Mac is wiped when the pass ends. Our Simulator on Windows guide shows what the remote screen is like.

Who should not rent a Mac for this

If you only need a build now and then, a hosted macOS runner can do it. The commands above ran on GitHub Actions with no Mac of our own. Codemagic lists Ionic support and gives individuals 500 free macOS M2 minutes a month. That is per its pricing page on October 19, 2026. If you ship every week, a used Mac may cost less over time. A rented Mac fits when you need Xcode open, for signing trouble or a native plugin bug.

Frequently asked questions

Can I run npx cap add ios on Windows?

+

Yes, with Capacitor 8 and Swift Package Manager. In our October 2026 test it wrote the Xcode project on Windows in under a second. npx cap sync ios worked too. Building the app still needs a Mac.

Does Capacitor use CocoaPods or Swift Package Manager for iOS?

+

New Capacitor 8 projects use Swift Package Manager. Our new project had a Package.swift and no Podfile. The docs say CocoaPods was the default before Capacitor 8 and is now optional.

Can I build a Capacitor iOS app on Windows?

+

Not the app itself. The xcodebuild step, the Simulator and signing need Xcode on macOS. You can prepare everything on Windows, push it to git, and build on a Mac or a macOS CI runner.

Is Ionic Appflow still available?

+

Ionic stopped new sales of Appflow on February 11, 2025. Existing Appflow users keep access through December 31, 2027, according to Ionic's announcement.

Can I build the Android app on Windows?

+

Yes. In our test, npx cap add android and gradlew.bat assembleDebug worked on Windows with JDK 21. The first build took 6 minutes 33 seconds and made an 8.2 MB debug APK.

How long does a Capacitor iOS build take?

+

Our starter app built for the Simulator in 24 to 36 seconds with Xcode 26.6 on a GitHub macOS runner. The longer time included fetching Swift packages. Bigger apps take longer.

Related guides