The short answer
The only part that must happen on macOS is the iOS build itself: flutter build ipa depends on Xcode, and the Flutter documentation states that it needs a device running macOS. Your Dart code, UI and Android version can stay on the computer you already use; the remote Mac only installs dependencies and produces the package.
Which steps require macOS
Steps that need macOS
flutter build ipa: it calls Xcode internally to archive and export. The Windows and Linux Flutter tools do not have this build target.- Installing CocoaPods dependencies: plugins with native iOS code rely on it to fetch and link them.
- Opening
ios/Runner.xcworkspacein Xcode for the first time to pick a Team and confirm the Bundle Identifier.
What you can finish on your own computer first
- All Dart business logic and UI, debugged on an Android device or a desktop target.
- The version in
pubspec.yaml(in the form1.0.0+1; the part after the plus sign is the build number). - Registering the Bundle ID in the Apple Developer portal and creating the app record in App Store Connect. Both are done in a browser.
The basis is Flutter's official iOS deployment documentation.
How to do it on a remote Mac
Install Xcode on the remote Mac and finish first-time setup
Install Xcode from the App Store with your own Apple Account. Then do three things from Flutter's iOS setup documentation: point the command-line tools at
/Applications/Xcode.app/Contents/Developerwithxcode-select -s, runxcodebuild -runFirstLaunch, and accept the license withxcodebuild -license. The official examples run the first two and the license command with elevated privileges, which asks for the password of the current Mac account. Your account is an admin account, so you can complete them.Install Flutter and CocoaPods, then clear every flutter doctor issue
Follow the official install page for the Flutter SDK. As soon as the project has a plugin with native code, you need CocoaPods; the official documentation only links to the CocoaPods installation guide and does not give a fixed command. After installing, run:
flutter doctorResolve each error in the Xcode section before going further. Do not start a build with red crosses still showing.
Pull the code onto the remote Mac with Git
Push the repository to the Git service you normally use and clone it on the remote Mac. After that, each release only needs a
git pull, which is less work than sending archives back and forth and will not miss changes underios/. Once the code is there, runflutter pub get.Open the Runner project and confirm the signing settings
open ios/Runner.xcworkspaceIn the Xcode navigator select the Runner target, check the Display Name and Bundle Identifier, and choose a Team under Signing & Capabilities. The official documentation says
Automatically manage signingis on by default and is enough for most apps. The details of this step are covered on our Flutter code signing page.Run the build
flutter build ipaCommon options listed in the official documentation:
--build-nameand--build-numberoverride the version inpubspec.yaml;--obfuscatetogether with--split-debug-infoobfuscates Dart code;--export-options-plist=<path>supplies export options so that repeat builds do not need Xcode opened again.Check where the output went
A successful build leaves two things: the Xcode archive (
.xcarchive) underbuild/ios/archive/, and the .ipa for App Store submission underbuild/ios/ipa/. If you only got the archive and no .ipa, signing most likely failed during export; open the archive in Xcode to read the exact message.
FAQ
The first build is very slow. Is that normal?
Yes. The first run has to download Xcode, the iOS platform components and every Pod; later builds reuse the caches. Download speed depends on your network connection. We have no measured figures and make no promise about duration.
Can I do everything from the command line without opening Xcode?
Once signing is configured, yes. The official approach is to export an ExportOptions.plist once from Xcode's Distribute App flow and reuse it with --export-options-plist. For the first build it is still worth confirming the Team and Bundle Identifier in the graphical interface.
How do I give a build to testers without going through the App Store?
The official documentation offers three values, --export-method ad-hoc, development and enterprise, for distribution outside the App Store. Each needs the matching type of provisioning profile; device scope and account requirements are defined in Apple's developer documentation.
I only need the Mac for packaging. How long should I rent it?
It depends on how often you release and how many rounds of fixes follow a rejected review. Pricing and availability are on the plans page; for estimating the term, see is one month enough to publish a single app.
Related
- How do I build an iOS ipa for a Flutter app developed on Windows?
- How do I set up iOS certificates and signing for Flutter without a Mac?
- How do I upload a Flutter .ipa to TestFlight and the App Store without a Mac?
- iOS without a Mac: a remote Mac mini can build, sign and upload, but not debug on a real device
- Is Xcode laggy on a remote Mac?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support