React Native — No bundle URL present in debug mode
Mar 3, 2021
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.