Ns ios deploy app

From Melvynx/saveit.now · View interactive version

Ns ios deploy app is an AI agent skill from the GitHub repository Melvynx/saveit.now. One-shot NowStack Mobile iOS deployment with asc App Store Connect CLI. Use when preparing TestFlight/App Store releases, uploading IPAs, syncing screenshots/metadata, validating review readiness, or submitting the iOS app without EAS Submit.

How to use this skill

Skill file

ns-ios-deploy-app - App Store Connect deployment for NowStack Mobile

<objective>

Ship NowStack Mobile to App Store Connect with asc as the default Apple deployment tool.

This skill does not use EAS Submit for Apple uploads. The target flow is:

  1. Build or obtain a signed production .ipa.
  2. Authenticate asc with App Store Connect.
  3. Use asc to resolve the app, upload/publish the build, sync screenshots/metadata where possible, validate readiness, and submit.

Build artifact generation is OS-aware: macOS may use local Xcode or local EAS, while Windows/Linux must load ns-setup-expo and use EAS cloud to produce the .ipa. App Store Connect automation belongs to asc.

</objective>

<when_to_use>

Use this workflow when:

Do NOT use this for:

</when_to_use>

<state_variables>

Persist these values across the workflow:

| Variable | Type | Description |

| --- | --- | --- |

| {app_name} | string | App name from SiteConfig.title / Expo config. |

| {slug} | string | Expo slug and URL scheme from SiteConfig.slug. |

| {bundle_id} | string | iOS bundle identifier from SiteConfig.bundleId and ios.bundleIdentifier. |

| {apple_team_id} | string | Apple Developer Team ID from SiteConfig.appleTeamId. |

| {app_store_app_id} | string | Numeric App Store Connect app ID / Apple ID. |

| {version} | string | App Store version string, usually from mobile-app/package.json / Expo config. |

| {build_id} | string | App Store Connect build ID after upload/processing. |

| {ipa_path} | string | Signed production .ipa path to upload. |

| {convex_prod_url} | string | Production Convex cloud URL for EXPO_PUBLIC_CONVEX_URL. |

| {convex_prod_site_url} | string | Production Convex site URL for EXPO_PUBLIC_CONVEX_SITE_URL. |

| {iap_product_id} | string | Apple IAP product ID from SiteConfig.payment.iapProductId. |

| {asc_key_id} | string | App Store Connect API key ID. Secret metadata; do not commit. |

| {asc_issuer_id} | string | App Store Connect API issuer ID. Secret metadata; do not commit. |

| {asc_p8_path} | string | Local path to the .p8 API private key. Never commit. |

| {dry_run} | boolean | If true, print plans and run dry-run commands only. |

</state_variables>

<critical_safety>

</critical_safety>

<preflight>

Run these checks from the repository root unless noted. Stop if deploy-relevant state is dirty or placeholders would ship.

gh repo view --json nameWithOwner,defaultBranchRef || true

git status --short --branch
node --version
npm --version
command -v asc && asc version
asc auth status --validate || asc auth doctor || true
cd mobile-app && npx expo config --type public

Read and verify these files:

site-config.ts
mobile-app/app.config.ts
mobile-app/package.json
mobile-app/lib/iap.ts
convex/payments/iap.ts
docs/templates/app-store-metadata.example.json
docs/templates/store-screenshot-manifest.example.json

Confirm:

</preflight>

<install_and_auth>

If asc is missing, install it:

brew install asc

or:

curl -fsSL https://asccli.sh/install | bash

If {asc_key_id}, {asc_issuer_id}, or {asc_p8_path} are unknown, run the ns-find-asc-credentials skill first — it locates .p8 keys on disk, reads the issuer ID from the user's signed-in browser session (App Store Connect web UI, via dev-browser CDP), and verifies the key is active before login.

Authenticate with an App Store Connect API key:

asc auth login \
  --name "NowStack" \
  --key-id "KEY_ID" \
  --issuer-id "ISSUER_ID" \
  --private-key "/secure/local/AuthKey_KEY_ID.p8" \
  --network

For CI/headless shells where keychain access is not available:

asc auth login \
  --bypass-keychain \
  --name "NowStack CI" \
  --key-id "KEY_ID" \
  --issuer-id "ISSUER_ID" \
  --private-key "/secure/local/AuthKey_KEY_ID.p8"

Then validate:

asc auth status --validate
asc auth doctor
asc apps list --output table

</install_and_auth>

<app_store_connect_setup>

Use asc as the Apple control plane:

Manual or web-session gates that may still exist:

</app_store_connect_setup>

<metadata_and_screenshot_automation>

Before binary publish or review submission, run .agents/skills/ns-generate-store-screenshots and require its manifest to be upload-ready.

Automation target:

</metadata_and_screenshot_automation>

<build_ipa>

This skill needs a signed production .ipa. Detect the OS before choosing the build path:

uname -s || node -p "process.platform"

Local Expo/Xcode path:

cd mobile-app
npm run env:prod
npx expo prebuild --clean --platform ios

Then archive/export with Xcode or xcodebuild. Keep ExportOptions.plist and signing material free of secrets and confirm the exact workspace/scheme before running destructive clean/archive steps.

Optional Xcode Cloud path:

asc xcode-cloud run --app "{app_store_app_id}" --workflow "CI" --branch "main" --wait

Windows/Linux required cloud path, and optional macOS fallback only if the user explicitly allows EAS cloud for build artifact generation:

cd mobile-app
npm run env:prod
npx eas build --platform ios --profile production --non-interactive

Do not use npx eas submit. Once the .ipa exists, deployment continues with asc.

</build_ipa>

<asc_publish_flow>

Before any mutation, run a dry run:

asc publish appstore \
  --app "{app_store_app_id}" \
  --ipa "{ipa_path}" \
  --version "{version}" \
  --submit \
  --dry-run \
  --output table

If the dry run is clean and the user confirms:

asc publish appstore \
  --app "{app_store_app_id}" \
  --ipa "{ipa_path}" \
  --version "{version}" \
  --submit \
  --confirm

Add --wait when the command should wait for build processing before attaching/submitting:

asc publish appstore \
  --app "{app_store_app_id}" \
  --ipa "{ipa_path}" \
  --version "{version}" \
  --submit \
  --wait \
  --confirm

If the user wants a checkpoint before review submission, stage first:

asc release stage \
  --app "{app_store_app_id}" \
  --version "{version}" \
  --build "{build_id}" \
  --metadata-dir "./metadata/version/{version}" \
  --dry-run \
  --output table

asc release stage \
  --app "{app_store_app_id}" \
  --version "{version}" \
  --build "{build_id}" \
  --metadata-dir "./metadata/version/{version}" \
  --confirm

Then submit explicitly:

asc review submit --app "{app_store_app_id}" --version "{version}" --build "{build_id}" --dry-run --output table
asc review submit --app "{app_store_app_id}" --version "{version}" --build "{build_id}" --confirm

</asc_publish_flow>

<post_submit_checklist>

After asc publish appstore or asc review submit succeeds:

cd mobile-app
npm run env:dev

</post_submit_checklist>

<failure_modes>

</failure_modes>

<success_metrics>

</success_metrics>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.