Test a Flutter iOS app from Windows
# Test a Flutter iOS app from Windows
Flutter builds an iOS app only where Xcode is installed, so flutter build ios on Windows stops with a message that iOS builds need a Mac. box runs the command on a real Mac.
Run it
box exec --platform ios -- flutter build ios --simulator
Flutter is not on the Mac image. box exec runs in the project folder on the Mac, and the home directory is fresh for every job, so installing Flutter is part of the command each time.
A real run, job bj_TeBd-t2pDkXnYTDL, installed Flutter and then built. The folder had no Flutter project, so the build stopped at the project check:
Target file "lib/main.dart" not found. box: bj_TeBd-t2pDkXnYTDL failed, 120s billed, $0.10
What it costs
$0.05 per minute of build and test time on iOS, every started minute. The minutes the command spends downloading Flutter count, because the command is running on the Mac. The run above was two minutes.
How else people do this
Codemagic prices its macOS build minutes at $0.095 a minute for a Mac mini M2 and $0.114 a minute for a Mac mini M4 (https://codemagic.io/pricing/). GitHub-hosted macOS runners cost 10 times the Linux per-minute rate (https://docs.github.com/en/billing/reference/actions-runner-pricing).
Apple, Mac, macOS, iPhone, Xcode, Swift and SwiftUI are trademarks of Apple Inc., registered in the U.S. and other countries and regions. box is an independent service and is not affiliated with, sponsored or endorsed by Apple Inc.