跳到正文
cccskills
免费在 GitHub 公开

ns-ios-setup

Set up local iOS dev/build tooling for NowStack Mobile: Xcode, Simulator, CocoaPods, Watchman, mobile deps, and first `expo run:ios`. Use for `/ns ios local-setup`, legacy `/ns setup-ios`, simulator preview, or local TestFlight prerequisites. macOS only; signing is `/ns ios setup`.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md6.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

ns-ios-setup — Local iOS dev environment

<objective> Take a Mac from "cloned the repo" to "`npm run ios` compiles and launches the dev build in the iOS Simulator". This is the **local preview** path (`expo run:ios`), the one you need to see native modules (Stripe, IAP, Apple Sign In) that do **not** exist in Expo Go.

It is NOT /ns ios setup — that wires EAS + Apple signing for TestFlight builds. This skill never touches an Apple account, never signs, never uploads. Everything here runs on this machine against the Simulator.

Detect what's missing, propose the whole batch in one confirmation, install, then run the first build. </objective>

<platform_guard> iOS development requires macOS — Xcode and the Simulator do not exist on Linux/Windows.

uname -s   # must be "Darwin"

If not Darwin: stop. Explain that local iOS builds need a Mac, and the alternatives are (a) an EAS cloud iOS build (/ns ios testflight, builds on Apple-hosted macOS) or (b) developing the Android/web surfaces locally. Do not attempt any install. </platform_guard>

<components> Detect each, then install only what's missing. Heavy GUI install (Xcode) is delegated to `/ns doctor`; this skill owns the iOS-specific configuration that `doctor` does not do.
ComponentCheckFix (macOS)
Xcode.app (~7 GB, the full IDE — not just CLT)xcodebuild -version succeedsInstall via App Store, or brew install xcodes && xcodes install --latest. If absent, offer to run /ns doctor (it owns the big GUI install).
Active developer dir → Xcode (not the CLT shim)xcode-select -p ends in /Xcode.app/Contents/Developersudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Xcode license acceptedxcodebuild -version doesn't error about a licensesudo xcodebuild -license accept
First-launch componentsn/a (idempotent)xcodebuild -runFirstLaunch
iOS Simulator runtime (an iPhone device available)xcrun simctl list devices available | grep -i iphone returns a rowxcodebuild -downloadPlatform iOS (Xcode 15+), or Xcode ▸ Settings ▸ Components
CocoaPods (prebuild runs pod install)pod --versionbrew install cocoapods
Watchman (Metro file watching)command -v watchmanbrew install watchman
Mobile node_modules (provides the expo binary)ls mobile-app/node_modules/.bin/expocd mobile-app && npm install — see note ↓

Mobile deps note: mobile-app/.npmrc pins legacy-peer-deps=true (Expo + React 19 pull react-dom at a newer patch than the pinned react, which trips npm's strict peer resolver → empty node_modules → expo: command not found). Keep that file; verify the tree actually landed, don't trust a bare "exit 0". This overlaps /ns onboard step 2 — skip if already populated. </components>

<workflow> 1. **Guard.** `uname -s` must be Darwin, else stop with the alternatives above. 2. **Detect.** Run every check in the table; build the missing list. 3. **Propose once.** Show the plan — each missing component + its exact command, and call out Xcode's ~7 GB download if absent. One confirmation for the batch. (`sudo` steps for license/select are part of the plan; the user will be prompted for their password by the OS.) 4. **Install + configure.** Run the accepted steps in order, idempotent — skip anything already present. Never reinstall a present tool or re-accept a license. 5. **First build.** From `mobile-app/`: ```bash npm run ios # = expo run:ios → prebuild → pod install → Xcode compile → launch Simulator ``` - The **first** build is slow (prebuild → CocoaPods → full Xcode compile, several minutes). Run it in the background and watch the log; report progress, don't declare success until the Simulator shows the app. - This generates `mobile-app/ios/` — **gitignored** (Continuous Native Generation), don't commit it. - Target a specific simulator if asked: `npm run ios -- --device "iPhone 17 Pro"`. - Another Expo app already running on 8081? Start Metro on an explicit port: `npx expo start --port 8082` (two apps on 8081 serve each other the wrong bundle). 6. **Report.** Installed-now / already-present / skipped, the Simulator device used, and the Metro port. Point at `/ns dev` (`npm run start-all`) for the everyday Convex + web + mobile loop. </workflow> <rules> - macOS only — never run Xcode/Simulator/CocoaPods steps on Linux/Windows; offer `/ns ios testflight --expo` if the user needs a cloud build instead. - One confirmation for the whole batch; idempotent — never touch a component already present. - Local dev only: no Apple ID, no signing, no uploads. Cloud signing/TestFlight is `/ns ios setup` → `/ns ios testflight`. - Verify the dev build is the goal — payments / Apple Sign In / IAP require it; Expo Go cannot load these native modules. Never verify those flows in Expo Go. - `mobile-app/ios/` is generated and gitignored — regenerated by `expo prebuild`; never commit it. - Prefer `trash` over `rm -rf` if a corrupt `ios/`/`Pods/` needs clearing. - Don't manage the user's global Node/Ruby version beyond what an install strictly requires. </rules> <verification> ```bash uname -s # Darwin xcodebuild -version # Xcode present + license ok xcode-select -p # …/Xcode.app/Contents/Developer xcrun simctl list devices available | grep -i iphone # at least one iPhone runtime pod --version && command -v watchman # CocoaPods + Watchman ls mobile-app/node_modules/.bin/expo # expo binary resolves ``` Green path ends with `npm run ios` showing the app in the Simulator. If the build fails, read the real `expo run:ios` log (pod install vs Xcode compile vs Metro) before guessing; see `docs/troubleshooting.md`. </verification>

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

convex

免费

Routes general Convex requests to the right project skill. Use when the user asks which Convex skill to use or gives an underspecified Convex app task.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

Use when optimizing Convex database read bandwidth, documents-read cost, query indexes, full-table scans, function-level usage dashboard findings, or code that uses .filter(), unbounded .collect(), N+1 reads, or expensive reactive Convex queries.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

Build reusable Convex components with isolated tables and app-facing wrappers. Use for defineComponent, app.use, ComponentApi, or shared backend modules.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

Plan safe Convex schema and data migrations. Use for widen-migrate-narrow rollouts, backfills, breaking field changes, table splits, or failed schema deploys.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

Audit Convex performance for hot reads, write contention, subscriptions, function limits, OCC conflicts, latency, read amplification, and expensive reactive queries.

中文简介正在准备中。当前显示原文说明。

Melvynx/saveit.now322026年10月19日 更新

查看 Melvynx 的全部技能

报告此技能的问题