Back to Writings
Harbor™ • Engineering

Building iOS Apps on Windows: How We Ship Harbor Without a Mac

· 4 min read

When we set out to build Harbor, our physics-based boating safety simulator, we had a grand vision for cross-platform availability. Using Flutter was an obvious choice to target both iOS and Android. However, there was a glaring roadblock: our primary development environment was Windows.

Traditionally, Apple's walled garden dictates that you need macOS hardware to compile, sign, and publish an iOS app. But buying a fleet of MacBooks just to compile code didn't align with our bootstrapped ethos. Here is how we managed to build, test, and deploy Harbor to the App Store without ever leaving our Windows machines.

The Challenge of the Walled Garden

Flutter is incredible at bridging the gap between platforms, but it still relies on native toolchains for the final compilation step. On Windows, you can easily build for Android using the Android SDK, but the iOS toolchain (Xcode) is exclusively available on macOS.

"The codebase was cross-platform, but the build process was decidedly not."

We needed a way to handle the iOS-specific build requirements—specifically code signing, Apple Developer Program integration, and packaging—remotely and reliably.

Enter Codemagic CI/CD

After researching several cloud-based build services, we landed on Codemagic. Unlike generic CI runners, Codemagic is built from the ground up for Flutter and mobile development. It provided exactly what we needed: macOS virtual machines in the cloud that could pull our repository, run `flutter build ipa`, and interface directly with Apple's servers.

Our workflow looks like this:

  • Local Development: We write all our Dart/Flutter code on Windows using VS Code. We test heavily on Android emulators and Windows native builds for rapid iteration.
  • Version Control: Changes are pushed to our Git repository.
  • Cloud Compilation: Codemagic detects the push, spins up a macOS runner, and executes our pre-defined build script.
  • Automated Code Signing: Codemagic securely manages our Apple distribution certificates and provisioning profiles, ensuring the `.ipa` file is properly signed for production.

The Magic of TestFlight Integration

Perhaps the most powerful part of this setup is the seamless integration with App Store Connect and TestFlight. Instead of manually uploading binaries, we configured our CI/CD pipeline to automatically push successful builds straight to TestFlight.

This means we can write code on a Windows PC, push a commit, and 20 minutes later receive a notification on our iPhones that a new version of Harbor is ready to test. It completely removes the friction of local macOS dependency.

The Verdict

Building an iOS app on Windows is not just possible; it can be incredibly efficient. By offloading the macOS-specific compilation steps to a specialized CI/CD pipeline, we maintained our preferred development environment without sacrificing our ability to ship to Apple users.

Harbor is currently in active development, and every line of code is being written on Windows. The water might not care what OS you use, and thankfully, with modern CI/CD, Apple doesn't have to either.