React Native — No bundle URL present in debug mode

--

React Native can be weird sometimes.

You want to debug your RN app locally in a simulator and your bundler is running locally, but you might see this error:

Quick Fix

Here’s the quick fix if you are in a hurry and don’t want to clean things.

Find your ipaddress of your local machine:

$ ipconfig getifaddr en0
192.168.1.3

Search for `RCTBundleURLProvider.m` file in XCode and modify the following method:

- (NSString *)guessPackagerHost{ //Add this line - replace IP Address with your IP Address
return
@”192.168.1.3";

This should unblock you. We’ll talk about how RN handles this in another post.

--

--

Dushyant Bansal
Dushyant Bansal

Written by Dushyant Bansal

EM @Thoughtspot. Previously @ Facebook, GoGoVan. Read more about me: https://www.linkedin.com/in/dushyant37/

No responses yet