NativeScript / NativeScript/docs
Document how to access a local service through "localhost"
未关闭
还没有人认领这个 Issue。
enhancement
- 主要语言
- JavaScript
- 星标
- 17
- 派生
- 31
- 平均合并
- 8 小时 51 分钟
- 30 天内合并 PR
- 2
描述
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?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先找到介绍本地服务或网络通信的 NativeScript 文档页面。验证 localhost 的行为以及 iOS 和 Android 常见的模拟器/设备地址,然后记录 cleartext-traffic 的要求,包括缺失的 iOS 指南。完成的标准是该页面涵盖列表中的每个环境,并提供准确的地址和设置说明。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, ios
- 领域
- documentation, mobile-dev
- Issue 类型
- 文档
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100