NativeScript / NativeScript/docs

Document how to access a local service through "localhost"

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
17
Forks
31
Avg merge
8h 51m
Merged PRs (30d)
2

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the NativeScript documentation page covering local services or networking. Verify localhost behavior and common emulator/device addresses for iOS and Android, then document the cleartext-traffic requirements, including the missing iOS guidance. Done means the page covers each listed environment with accurate addresses and setup notes.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios
Domain
documentation, mobile-dev
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.