用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/G1Joshi/Agent-Skills --skill nativescript命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | nativescript |
| description | NativeScript native mobile with JS. Use for native mobile. |
NativeScript allows you to write native mobile apps using JavaScript/TypeScript, Angular, Vue, or Svelte. Unlike hybrid apps (WebView), it renders native UI components and provides direct access to all iOS and Android APIs without boilerplate wrappers.
npm install -g nativescript
ns create my-app
# Choose flavor: Angular, Vue, React, Svelte, or TypeScript
cd my-app
ns run android
// Accessing Native APIs directly (Android)
const time = new android.text.format.Time();
time.setToNow();
console.log(time.format("%d.%m.%Y"));
The V8 (Android) and JavaScriptCore (iOS) engines are modified to inject native APIs into the JS global scope.
new android.widget.Button(context) creates a real Android Button.UILabel.alloc().init() creates a real iOS Label.NativeScript uses its own layout system that maps to native structures.
StackLayout, GridLayout, FlexboxLayout.While you can call native APIs directly, plugins are used to simplify complex tasks (Camera, Map) and provide a unified JS API.
Do:
Webpack optimizations provided by the CLI.Don't:
| Error | Cause | Solution |
|---|---|---|
Marshalling Error | Passing wrong type to native interaction. | Check native docs and cast types if needed. |
Out of Memory | Large images or memory leaks. | Use image-cache-it or proper GC disposal management. |
Build Failed | Native dependency issues. | ns clean, remove platforms/ and node_modules/, re-run. |