Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

[React-Native][IOS]How to dynamic set Debug server host for device setting like Android

My mac-os using Wifi and when i move to other place my ip change and i always rebuild app for testing. Rebuild app is annoying.

  • How can i set Development Server IP Address in IOS after build and run on Physical Device?

on Android, i can set Development Server in Dev Menu, Dev Settings, Debug server host for device setting but nowhere found in IOS.

like image 876
MasterLuV Avatar asked Dec 20 '25 04:12

MasterLuV


1 Answers

Why couldn't you have a UIViewController with a UITextField that contains the URL or IP you want to use and a UIButton on it that saves and updates this, then store the result in UserDefaults and pull from that for a URL every time?

There are also other options like Firebase Remote Config, which I would use instead of the above if you have many variables you'd want to configure on the fly like this.

If you're just trying to swap the IP/port as you move to a new network, I'd still just store it in UserDefaults and make a page to update it, though.

like image 170
bdrelling Avatar answered Dec 21 '25 20:12

bdrelling



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!