Remote testing and debugging of iOS apps

One problem that many iOS app developers have encountered is how to debug iOS programs being run on remote iOS devices. Good thing if you can connect an iPhone, iPad, iPod, etc. directly to your development computer. But what should you do if you don’t have the iOS device around to plug it into your local machine? Is there any way to get remote access to the device and applications it’s running?

Xcode to the rescue - debug iOS apps wirelessly

Thanks to the relatively new feature found in Xcode 9, iOS app developers are able to test their creations remotely. That means you don’t need to always physically connect and disconnect the device for app installation and debugging, you’re able to just access the required iOS gadget over the network.

However, before choosing this method you should note that:

  1. In order to set up remote debugging, you’ll still need to physically connect the iOS device to your development machine.
  2. Mac running Xcode and the iOS device you want to connect remotely must share the same local network. Otherwise, you won’t be able to use this feature.

FlexiHub: connect to remote iOS devices from anywhere

If the feature found in Xcode does not fit your purposes, you definitely should give a try to FlexiHub.

FlexiHub caught my eye precisely because the software works equally well across any network and is extremely simple to install and use.

FlexiHub’s unique port virtualization technology and its intuitive GUI are its strong points. The app is designed to virtualize iOS devices and redirect them over the network. That means you don’t need to have the target device near your local PC to be able to access its functionality and contents. This could be a significant advantage for mobile app developers.

Here’s how FlexiHub works:

  1. When you first join the service, it suggests that you create an account and sign up for a free trial.
  2. Then, install FlexiHub on the local Mac running the debugger as well as on the remote machine where the iOS device is connected physically.
  3. After that, start the software on the local machine and log into the FlexiHub account.
  4. Repeat the previous step for the remote computer.
  5. In the software interface, you’ll see this device available for connection. All you need to do is click “Connect”.

After that, the remote iOS device will appear in the Device Manager of your local computer like it was directly connected to that machine.

Again, this is all about letting you go straight to app debugging on a remote device in the simplest and fastest way.

If FlexiHub is not exactly what you are looking for right now, here is a simple step-by-step instruction on how to enable remote debugging in Xcode:

  1. First, you need to make sure that you’re running Xcode 9.0 or later, macOS 10.12.4 or later, and iOS 11.0 or later.
  2. Then, to set up iPhone, iPad, or iPod touch, open your project on Xcode.
  3. Choose “Window” > “Devices and Simulators”.
  4. Click “Devices” in the invoked window.
  5. Connect the required device to your Mac with the help of a USB cable.
  6. In the left column, select the device and enable “Connect via network” in the detail area.
  7. Now, Xcode will pair with your device. If the connection is established, you’ll see a network icon next to the device in the left column.
  8. Finally, disconnect the device.

Here you go! Now, everything is set up to start the remote debug of your iOS app.

Published 1 Aug 2018

I build mobile and web applications. Full Stack, Rails, React, Typescript, Kotlin, Swift
Pulkit Goyal on Twitter