ios-local-staging-setup

Set up a local iOS staging environment with Supabase and production data snapshots.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ElvinOuyang/claude-skill-collection --skill ios-local-staging-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ios-local-staging-setup
Source: https://github.com/ElvinOuyang/claude-skill-collection/tree/main/plugins/ios-dev-toolkit/skills/ios-local-staging-setup
Command: npx skills add https://github.com/ElvinOuyang/claude-skill-collection --skill ios-local-staging-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It solves the problem of slow, fragile local iOS development that can only use mocked data instead of production-like behavior, by wiring an iOS simulator to a local Supabase instance loaded with a scoped snapshot of real production data.

Core Features & Use Cases

  • One-time local staging infrastructure: Initializes Supabase locally, sets up env switching, and configures simulator-only behavior so builds continue targeting production automatically.
  • Compile-time URL switching for simulator: Detects DEBUG + simulator at compile time to route API calls to localhost without manual scheme/xcconfig changes.
  • Staging auth and graceful fallback: Adds a simulator launch argument flow (--skip-auth) to sign in against local staging users when available, with PreviewData fallback when Supabase is down.
  • Production-to-local snapshot pipeline: Provides a scripted approach to export a single owner’s scoped production data and import it into local Supabase with matching auth identities and FK-safe ordering.

Quick Start

Run this skill to add local staging infrastructure so your iOS simulator automatically uses a local Supabase snapshot with real production data while device/TestFlight builds keep hitting production.

Frequently Asked Questions about ios-local-staging-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a local iOS staging environment with Supabase?

Switch iOS simulator API URLs to localhost automatically by detecting the DEBUG and simulator environment at compile-time, which routes network calls to local Supabase without requiring manual xcconfig changes.

How does staging auth work when running an iOS simulator offline?

Simulator staging auth uses a launch argument flow to sign in against local staging users, providing a PreviewData fallback when the local Supabase instance is down or unreachable during offline testing.

How do I copy scoped production data to a local Supabase instance for iOS testing?

Copy scoped production data to local Supabase using a snapshot pipeline script that exports a single owner's records, imports them with matching auth identities, and ensures foreign-key-safe ordering to verify RLS behavior.

Will using a local staging environment affect my production iOS builds?

Local staging environments do not affect production iOS builds because simulator-only behavior ensures that device and TestFlight builds automatically continue targeting the production Supabase environment.

Do I need to manually change Xcode schemes to test iOS apps locally?

You do not need to manually change Xcode schemes to test locally because the setup uses compile-time environment switching and simulator launch arguments to handle routing and authentication automatically.