🎯

ios-app-scaffold

🎯Skill

from tddworks/claude-skills

VibeIndex|
What it does

ios-app-scaffold skill from tddworks/claude-skills

πŸ“¦

Part of

tddworks/claude-skills(4 items)

ios-app-scaffold

Installation

PythonRun Python server
python3 scripts/scaffold.py <AppName> <output-directory> [--bundle-id <id>] [--team-id <id>]
PythonRun Python server
python3 scripts/scaffold.py MyApp /Users/me/projects --bundle-id com.mycompany.myapp --team-id ABC123
πŸ“– Extracted from docs: tddworks/claude-skills
2Installs
19
-
Last UpdatedJan 26, 2026

Skill Details

SKILL.md

|

Overview

# iOS App Scaffold

Scaffold iOS apps with Tuist, Swift 6, and layered architecture.

Quick Start

Run the scaffold script:

```bash

python3 scripts/scaffold.py [--bundle-id ] [--team-id ]

```

Example:

```bash

python3 scripts/scaffold.py MyApp /Users/me/projects --bundle-id com.mycompany.myapp --team-id ABC123

```

Then generate and open:

```bash

cd /Users/me/projects/MyApp

tuist generate

open MyApp.xcworkspace

```

Generated Structure

```

AppName/

β”œβ”€β”€ Sources/

β”‚ β”œβ”€β”€ App/ # SwiftUI views, app entry

β”‚ β”‚ β”œβ”€β”€ Views/

β”‚ β”‚ β”œβ”€β”€ Resources/

β”‚ β”‚ β”‚ β”œβ”€β”€ Assets.xcassets

β”‚ β”‚ β”‚ β”œβ”€β”€ XCConfig/ # Build configuration

β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ shared.xcconfig

β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ debug.xcconfig

β”‚ β”‚ β”‚ β”‚ └── release.xcconfig

β”‚ β”‚ β”‚ └── en.lproj/

β”‚ β”‚ β”œβ”€β”€ Application/

β”‚ β”‚ β”œβ”€β”€ Info.plist

β”‚ β”‚ └── AppNameApp.swift

β”‚ β”œβ”€β”€ Domain/ # Business logic (no dependencies)

β”‚ β”‚ β”œβ”€β”€ Models/

β”‚ β”‚ β”œβ”€β”€ Protocols/ # @Mockable repository interfaces

β”‚ β”‚ └── Utils/

β”‚ └── Infrastructure/ # Persistence implementations

β”‚ └── Local/ # SwiftData repositories

β”œβ”€β”€ Tests/

β”‚ β”œβ”€β”€ DomainTests/

β”‚ └── InfrastructureTests/

β”œβ”€β”€ Project.swift # Tuist configuration

β”œβ”€β”€ Tuist.swift

β”œβ”€β”€ .gitignore

└── README.md

```

Architecture

| Layer | Purpose | Dependencies |

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

| Domain | Models, protocols, business logic | None |

| Infrastructure | SwiftData persistence | Domain |

| App | SwiftUI views, app entry | Domain, Infrastructure |

For detailed patterns, see [references/architecture.md](references/architecture.md).

After Scaffolding

  1. Replace example files: Edit Example.swift, ExampleRepository.swift, LocalExampleRepository.swift
  2. Add domain models: Create models in Sources/Domain/Models/
  3. Define protocols: Add repository protocols in Sources/Domain/Protocols/
  4. Implement persistence: Add SwiftData entities in Sources/Infrastructure/Local/
  5. Build UI: Create views in Sources/App/Views/

Adding Dependencies

Edit Project.swift packages array:

```swift

packages: [

.remote(url: "https://github.com/Kolos65/Mockable.git", requirement: .upToNextMajor(from: "0.5.0")),

// Add more packages here

],

```

Then add to target dependencies:

```swift

dependencies: [

.package(product: "PackageName"),

]

```

Key Patterns

Domain models are rich - Include computed properties and business logic:

```swift

public struct Order: Identifiable, Codable, Sendable {

public var items: [Item]

public var total: Decimal { items.reduce(0) { $0 + $1.price } }

}

```

Protocols use @Mockable - Enables testing without real persistence:

```swift

@Mockable

public protocol OrderRepository: Sendable {

func fetchAll() async throws -> [Order]

}

```

Views consume Domain directly - No ViewModel layer needed:

```swift

struct OrdersView: View {

let orders: [Order] // Domain model directly

}

```

Version Management

Version numbers are managed in Project.swift build settings:

```swift

settings: .settings(

base: [

"MARKETING_VERSION": "1.0.0", // App Store version

"CURRENT_PROJECT_VERSION": "1", // Build number

],

...

)

```

The Info.plist references these via build setting variables:

  • CFBundleShortVersionString β†’ $(MARKETING_VERSION)
  • CFBundleVersion β†’ $(CURRENT_PROJECT_VERSION)

To bump version, edit Project.swift:

```swift

"MARKETING_VERSION": "1.1.0",

"CURRENT_PROJECT_VERSION": "2",

```

XCConfig

Build settings are managed via xcconfig files in Sources/App/Resources/XCConfig/:

| File | Purpose |

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

| shared.xcconfig | Common settings (bundle ID, team ID, deployment target) |

| debug.xcconfig | Debug configuration (Apple Development signing) |

| release.xcconfig | Release configuration (Apple Development signing) |

Edit shared.xcconfig to customize:

```

PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.app

DEVELOPMENT_TEAM = YOUR_TEAM_ID

IPHONEOS_DEPLOYMENT_TARGET = 18.0

```