Airsc is free for everyone. If it helps you, support it with $2–$20.

Support
PluginCautionBuilding web & mobile appsSome setup

claude-code-ios-dev-guide

keskinonur · keskinonur/claude-code-ios-dev-guide

A comprehensive guide to configure Claude Code CLI for iOS development, enabling PRD-driven workflows, extended thinking, and planning modes optimized for Swift/SwiftUI.

A comprehensive guide for setting up Claude Code CLI with PRD-driven workflows, extended thinking (ultrathink), and planning modes optimized for Swift/SwiftUI iOS development.

841 stars87License: No licenseUpdated 10 months ago0 opens

Preview

▍

What you can do with it

  • Set up a Claude Code environment specifically for building iOS applications.
  • Implement PRD-driven development workflows with AI assistance for Swift projects.
  • Configure custom slash commands and agent skills for iOS-specific tasks.

Safety check

Caution

Usable, but read the notes first.

  • ●Installer downloads a remote script and pipes it to the shell.README.md
  • ●No clear license: check with the author before using it in a commercial product.

Automated scan of the repo files. Always review code you run.

From the README

Claude Code CLI - Complete iOS Development Setup Guide

A comprehensive guide for setting up Claude Code CLI with PRD-driven workflows, extended thinking (ultrathink), and planning modes optimized for Swift/SwiftUI iOS development.


Table of Contents

  1. Installation
  2. Configuration Hierarchy
  3. CLAUDE.md Setup for iOS Projects
  4. PRD-Driven Development Workflow
  5. Extended Thinking & Ultrathink
  6. Plan Mode Configuration
  7. XcodeBuildMCP Integration
  8. Custom Slash Commands for iOS
  9. Agent Skills
  10. Subagents Configuration
  11. Output Styles
  12. Plugins System
  13. Sandbox Mode & Safe Development
  14. Settings & Permissions
  15. Hooks for Swift Development
  16. Complete Project Structure
  17. Best Practices & Tips

1. Installation

Native Installation (Recommended)

# macOS/Linux - Native installer (no Node.js required)
curl -fsSL https://claude.ai/install.sh | bash

# Or install latest version
curl -fsSL https://claude.ai/install.sh | bash -s latest

NPM Installation (Alternative)

# Global npm install (do NOT use sudo)
npm install -g @anthropic-ai/claude-code

# Migrate existing npm install to native
claude install

Authentication

# Start Claude Code and authenticate via OAuth
claude

# Or set API key environment variable
export ANTHROPIC_API_KEY="your-key-here"

Model Selection

# Use specific model at startup
claude --model claude-opus-4-5-20250929
claude --model claude-sonnet-4-5-20250929
claude --model claude-3-5-haiku-20241022

# Or set default model
export ANTHROPIC_MODEL="claude-sonnet-4-5-20250929"

2. Configuration Hierarchy

Claude Code uses a layered configuration system where each level can override the one below:

Priority (Highest to Lowest):
├── 1. Session flags (--model, --permission-mode)
├── 2. Environment variables
├── 3. .claude/settings.local.json (local - personal, gitignored)
├── 4. .claude/settings.json (project - shared with team)
└── 5. ~/.claude/settings.json (user - global)

Configuration Scopes

ScopeDescriptionStorage
localAvailable only to you in current project (default for MCP).claude/settings.local.json
projectShared with team via git.claude/settings.json, .mcp.json
userAvailable across all your projects~/.claude/settings.json

Key Configuration Files

FileScopeGit StatusPurpose
~/.claude/settings.jsonUserN/AGlobal preferences
~/.claude/CLAUDE.mdUserN/AGlobal instructions
~/.claude/skills/UserN/APersonal Agent Skills
~/.claude/commands/UserN/APersonal slash commands
.claude/settings.jsonProjectCommittedTeam settings
.claude/settings.local.jsonLocalGitignoredPersonal overrides
.mcp.jsonProjectCommittedShared MCP servers
CLAUDE.mdProjectCommittedMain project context
.claude/skills/ProjectCommittedProject Agent Skills
.claude/commands/ProjectCommittedProject slash commands
.claude/agents/ProjectCommittedProject subagents

3. CLAUDE.md Setup for iOS Projects

The CLAUDE.md file is your primary context provider. Claude automatically loads it at session start.

Root CLAUDE.md Template for iOS

Create CLAUDE.md in your project root:

# Project: [Your App Name]

## Quick Reference
- **Platform**: iOS 17+ / macOS 14+
- **Language**: Swift 6.0
- **UI Framework**: SwiftUI
- **Architecture**: MVVM with @Observable
- **Minimum Deployment**: iOS 17.0
- **Package Manager**: Swift Package Manager

## XcodeBuildMCP Integration
**IMPORTANT**: This project uses XcodeBuildMCP for all Xcode operations.
- Build: `mcp__xcodebuildmcp__build_sim_name_proj`
- Test: `mcp__xcodebuildmcp__test_sim_name_proj`
- Clean: `mcp__xcodebuildmcp__clean`

## Project Structure

MyApp/ ├── App/ # App entry point, App delegate ├── Features/ # Feature modules │ ├── [FeatureName]/ │ │ ├── Views/ # SwiftUI views │ │ ├── ViewModels/ # @Observable classes │ │ └── Models/ # Data models ├── Core/ # Shared utilities │ ├── Extensions/ │ ├── Services/ │ └── Networking/ ├── Resources/ # Assets, Localizations └── Tests/


## Coding Standards

### Swift Style
- Use Swift 6 strict concurrency
- Prefer `@Observable` over `ObservableObject`
- Use `async/await` for all async operations
- Follow Apple's Swift API Design Guidelines
- Use `guard` for early exits
- Prefer value types (structs) over reference types (classes)

### SwiftUI Patterns
- Extract views when they exceed 100 lines
- Use `@State` for local view state only
- Use `@Environment` for dependency injection
- Prefer `NavigationStack` over deprecated `NavigationView`
- Use `@Bindable` for bindings to @Observable objects

### Navigation Pattern
```swift
// Use NavigationStack with type-safe routing
enum Route: Hashable {
    case detail(Item)
    case settings
}

NavigationStack(path: $router.path) {
    ContentView()
        .navigationDestination(for: Route.self) { route in
            // Handle routing
        }
}

Error Handling

// Always use typed errors
enum AppError: LocalizedError {
    case networkError(underlying: Error)
    case validationError(message: String)
    
   
View source on GitHub