R01010010
R01010010

Reputation: 5958

App in react native (ios) only starts when phone connected to mac

I'm starting to develop a react-native app, so almost not experience at all. So far I have my app installed in an iPhone. When I start it connected to the mac (by usb) it starts fine and all (it appears a kind of a logging message in green at the top of the screen).

However, when the phone is disconnected from the mac, the app doesn't start well, it gets freezed on the 'Powered by react' screen. I wonder if this is a common problem I cant get rid of quickly.

Upvotes: 0

Views: 706

Answers (1)

Ata Mohammadi
Ata Mohammadi

Reputation: 3550

Because the app on your Phone is loading the JS Bundle from your Mac. You can run the app standalone on your phone just if it's build release ( the js bundle is embeded) or you change the setting on your phone to instead of loading JS Bundle from localhost, load it from your Mac's IP. you need to be connected to same Wifi.

Upvotes: 3

Related Questions