Using ADB to run React Native on-device (iOS)

1.6k views Asked by At

In the React Native documentation (0.40) "Running on Device" for iOS on MacOS, it suggests using adb reverse to connect to the development server over USB. This method is, in fact, the recommended method.

I understand this works for Android, but I wasn't aware it would work for iOS devices. Whenever I try adb reverse tcp:8081 tcp:8081 as per the docs, it gives me error: no devices/emulators found.

After searching on Google for using adb with iOS/iPhone, I wasn't getting anything. I also didn't find anything on React Native's issues regarding it, and Stack Overflow's closest thread is related to debugging with adb, not running React Native (or iOS generally) through USB using adb.

Does anyone have any experience using this method successfully?

1

There are 1 answers

1
Fidan Hakaj On BEST ANSWER

As mentioned in comment by jcaron, there was an issue in the doc, adb is Android specific.

A pull request was sent and accepted a few days ago.

The changes are already reflected in the next version: http://facebook.github.io/react-native/releases/next/docs/running-on-device.html