Home/Without a Mac/How do I debug Flutter iOS on the simulator and a real iPhone without a Mac?

How do I debug Flutter iOS on the simulator and a real iPhone without a Mac?

Updated · airankrush

The short answer

The iOS simulator ships with Xcode and runs only on macOS; on a remote Mac, flutter run hot-reloads normally. Real-device debugging does not work: the first step of Flutter's official flow is to connect the device to the Mac over USB and tap Trust on the phone, and you cannot plug a phone into a machine that is not next to you.

Which steps require macOS

Only possible on macOS

  • Running the iOS simulator. In Flutter's iOS setup documentation, the command to download the simulator runtime is xcodebuild -downloadPlatform iOS.
  • Installing a debug build on an iPhone: the official steps are USB connection → tap Trust on the phone → enable Developer Mode in the phone's settings → sign with a development certificate.

No Mac needed

  • Dart logic, state management and the great majority of UI problems can be debugged on an Android device or emulator. What really needs a separate look on iOS is platform differences: safe areas, font rendering, permission prompts, and the behaviour of native plugins.

What a remote Mac cannot do

Wired real-device debugging. For wireless debugging, we found no official statement that it works when the phone and the Mac are not on the same local network, so please do not treat it as an option; our page can a remote Mac debug on a real device explains why.

How to do it on a remote Mac

  1. Download the simulator runtime

    In Terminal on the remote Mac, run:

    xcodebuild -downloadPlatform iOS

    The runtime is not small, and the download time depends on the network connection. If you need simulators for other OS versions, add the components in Xcode following Apple's documentation.

  2. Start the simulator

    The Flutter documentation gives two commands depending on the Xcode version: on earlier versions it is open -a Simulator; the documentation states that newer Xcode renames it Device Hub, with open -a DeviceHub. Go by the Xcode version you installed and the official documentation.

  3. Let Flutter find the device and run

    flutter devices
    flutter run -d <device_id>

    The first command lists available devices; put the simulator's ID into the second. Once it is running, press r in the terminal to hot reload. Simulator animations viewed through a remote desktop drop more frames than locally. That comes from transmitting the picture and does not mean the app itself is slow.

  4. Use Xcode when the problem is in the native layer

    Dart-level errors show in the terminal and in DevTools. If a plugin's native code crashes, open ios/Runner.xcworkspace in Xcode, run on the same simulator, and read the full native stack trace in the Xcode console.

  5. Move real-device checks to TestFlight

    Run flutter build ipa on the remote Mac and upload it, add yourself as a TestFlight internal tester, and install on the iPhone you have at hand. That package is a release build with no hot reload and no breakpoints, so add logging or crash reporting to the code beforehand.

  6. Write down what can only be tested on a real device

    Camera, Bluetooth, NFC, push delivery and some sensors are not covered by the simulator. Before a release, list those features and walk through each one on the phone for every TestFlight build. If features like these are the core of your app, you need a Mac on your desk.

FAQ

Does hot reload work in the simulator?

Yes. The simulator and flutter run are on the same Mac, so nothing crosses the network. The iOS local network permission prompt mentioned in the Flutter documentation applies to debug and profile builds; tap Allow when you see it.

Can a free Apple Account be used for real-device debugging?

The Flutter documentation says a free personal account is enough if you only test on a device. The precondition is still that the device can be connected by cable to this Mac, and in a remote setup that precondition does not hold.

Can I send a debug build to my phone through TestFlight and connect back to debug it?

Do not plan on it. Hot reload needs the development machine and the device to reach each other. Customers may not change the network configuration of the remote Mac, and we do not recommend installing tools that change the network exit or expose ports to the outside for this purpose.

The simulator is choppy over remote desktop. What can I do?

Compare the other connection method first: we provide two, UU Remote and RustDesk, described in the help center. Smoothness depends on your own local network connection; see also is Xcode laggy on a remote Mac.

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

Back to home · All no-Mac guides