Document how to access a local service through "localhost"
rigor789 opened this issue · comments
Igor Randjelovic commented
Accessing localhost depends on where the apps is running:
- iOS Simulator -> can access localhost/127.0.0.1
- Android emulator -> needs to use a special IP, often 10.2.2.0 (todo: fact-check and list common ips to try)
- iOS Device -> needs to access an address accessible on the local network like 192.168.0.x or similar
- Androud device -> same as iOS device.
Mention that cleartext traffic is blocked by default (silently), so http or ws requests will not work unless you specifically allow cleartext traffic:
Android:
<application
<!-- ... -->
android:usesCleartextTraffic="true"
<!-- ... -->
</application>
ios?