Remote debugging on iPhone / iOS device with React Native

23 Jan 2018

Having a problem where shaking your iPhone won’t activate the in-app developer menu? Yep, me too.

First, check your scheme to make sure your product is in debug mode:

Product → Scheme → Edit Scheme

Also, make sure you have your iPhone and your computer on the same network.

To get your iPhone to access a local development API on your computer, use ngrok, ie:

Start ngrok with something similar to:

ngrok http -region=au -host-header=rewrite api.lvh.me:3000

and then in your React Native code:

if (__DEV__)
  return 'https://myRandomAddress.au.ngrok.io'