Flutter
Mobile App Testing
Real Device Testing
Flutter Development
App Deployment

How do I run/test my Flutter app on a real device?

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

Running a Flutter app on a real device is the fastest way to verify hardware behavior, performance, permissions, and platform integration that simulators often miss. The workflow is straightforward once the device is trusted, developer mode is enabled, and Flutter can see the device from the command line.

First Check the Toolchain

Before connecting a phone, verify your Flutter setup:

bash
flutter doctor

Fix the major issues it reports first. If Android SDK, Xcode, or device tooling is broken, real-device deployment will fail later in less obvious ways.

Then list available devices:

bash
flutter devices

If your phone is connected and recognized, it should appear in that list.

Running on a Real Android Device

1. Enable Developer Mode and USB Debugging

On Android, enable Developer options and USB debugging. The exact menus vary by manufacturer, but the usual path is:

  1. open Settings
  2. tap Build number several times
  3. open Developer options
  4. enable USB debugging

When you plug in the device, accept the RSA trust prompt if it appears.

2. Confirm Flutter Sees the Device

bash
flutter devices

If the device is visible, run:

bash
flutter run

If multiple devices are connected, specify one:

bash
flutter run -d <device-id>

3. Use Hot Reload During Testing

While the app is running from the terminal:

  • press r for hot reload
  • press R for hot restart

That makes real-device iteration much faster than rebuilding from scratch every time.

Running on a Real iPhone

On iOS, the process is similar but includes signing:

  1. connect the device
  2. trust the computer on the phone
  3. open the iOS project in Xcode when necessary
  4. configure a valid development team for signing

Then check visibility:

bash
flutter devices

And run:

bash
flutter run -d <device-id>

If iOS signing is not configured, Flutter may detect the device but still fail to launch the app.

Debug vs Release Testing

flutter run starts a debug build by default. That is ideal for development, but not for performance measurement.

For a more production-like run:

bash
flutter run --release

Use release mode when testing:

  • startup time
  • animation smoothness
  • battery impact
  • native plugin behavior under production compilation

Debug mode is excellent for iteration, but it is not a fair representation of final runtime performance.

Useful Device Debug Commands

Check connected devices:

bash
flutter devices

View logs:

bash
flutter logs

Install dependencies and run:

bash
flutter pub get
flutter run

If the app installs but crashes immediately, logs are often much more useful than the generic launch error message.

Common Reasons the Device Is Not Found

On Android:

  • USB debugging is disabled
  • the trust prompt was denied
  • the cable is charge-only
  • OEM drivers are missing on Windows

On iOS:

  • the phone is not trusted
  • signing is not configured
  • the device is locked
  • the development profile is not accepted

In both cases, always check flutter doctor and flutter devices before changing app code. Tooling visibility comes first.

Practical Testing Advice

Real-device testing is most valuable for things emulators approximate poorly:

  • camera access
  • push notifications
  • file-system permissions
  • Bluetooth or location behavior
  • animation and scrolling smoothness

Use emulators for convenience, but do a real-device pass before calling the feature done.

Common Pitfalls

  • Trying to debug app code before confirming that flutter doctor and flutter devices both report a healthy setup.
  • Using a USB cable that only charges and does not carry data.
  • Measuring performance in debug mode and then drawing conclusions about release behavior.
  • Forgetting platform-specific setup such as Android USB debugging or iOS code signing.
  • Assuming the app is fine because it works in an emulator, even though real-device sensors, permissions, and performance can differ materially.

Summary

  • Start with flutter doctor, then confirm the phone appears in flutter devices.
  • On Android, enable USB debugging and trust the development machine.
  • On iOS, trust the device and configure signing correctly.
  • Use flutter run for normal development and flutter run --release for realistic performance testing.
  • Real-device testing is essential for validating hardware access, permissions, and production-like behavior.

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.