Running on a Real Device

Running on a real device is imperative to testing how the app will actually perform.

Running on a real device#

We can run the apps on iOS and Android devices. Apps running in debug mode will work better on a real device compared to on an emulator, though a release version is what the end users of the app will get to experience.

Android#

On Android, we can troubleshoot on real devices using USB mode. It is also possible to build APKs and share them like we share files.

USB#

To connect a device using USB mode, make sure that the USB Debugging mode is switched on on your device:

  • On the device, go to Settings > About device.

  • Tap the Build number seven times. This enables Developer options in your settings.

  • Then enable the USB Debugging option.

After enabling the debugging mode, connect the Android device using USB and it'll show up on the device list along with other emulators.

From here on, everything works the same as debugging on an emulator.

iOS#

Connecting with a USB works on iOS too.

USB#

Running the app on a device is similar in iOS to with Android. After connecting the device using USB, it will show up on the device list along with other emulators.

  • XCode may ask to install additional software when we connect a phone for the first time or a new device type.

  • A sign-in profile may be required. For this, create an apple account and sign in to XCode using it.

From here on, everything works the same as debugging on an emulator.

To distribute iOS builds we need an Apple Developer paid account, though we can develop and test on devices without a paid account.

Start a new discussion. All notification go to the author.