Xcode Setup Guide

Using Bootspring with Apple's Xcode IDE for iOS, macOS, and watchOS development.

Overview#

While Bootspring is optimized for web/Node.js development, it can enhance Xcode workflows through:

  • Terminal Integration - CLI commands in Xcode's terminal
  • Context Generation - CLAUDE.md for AI assistants
  • Build Scripts - Integrate with Xcode build phases
  • Documentation - Generate and manage project docs

Prerequisites#

  • Xcode 14+ installed
  • Node.js 18+ installed (via Homebrew)
  • Bootspring CLI installed
  • macOS 12+ (Monterey or later)

Installing Node.js for Xcode#

Xcode doesn't include Node.js, so install it separately:

1# Using Homebrew 2brew install node 3 4# Verify 5node --version 6npm --version

Installing Bootspring#

npm install -g @girardmedia/bootspring bootspring --version

Integration Methods#

Method 1: Terminal Tab#

Use Xcode's built-in terminal:

  1. WindowOrganize Terminal
  2. Open a new terminal tab
  3. Navigate to your project directory
  4. Run Bootspring commands
cd ~/Developer/MyApp bootspring init bootspring generate

Method 2: Build Phase Scripts#

Add Bootspring commands to build phases:

  1. Select your target in Xcode
  2. Go to Build Phases
  3. Click +New Run Script Phase
  4. Add Bootspring commands

Generate context on build:

# Run Script Phase export PATH="/opt/homebrew/bin:$PATH" bootspring generate --quiet || true

Quality check before archive:

# Run Script Phase (Archive only) export PATH="/opt/homebrew/bin:$PATH" if [ "$CONFIGURATION" = "Release" ]; then bootspring quality pre-deploy || exit 1 fi

Method 3: External Build Tools#

Use Xcode's External Build System for Bootspring workflows:

  1. FileNewProject
  2. Choose External Build System
  3. Set build tool to Bootspring

Context Generation#

Initialize Project#

cd /path/to/XcodeProject bootspring init

Swift/iOS Context#

Configure for Swift development:

1// bootspring.config.js 2module.exports = { 3 project: { 4 name: 'MyiOSApp', 5 type: 'swift', 6 platform: 'ios', 7 language: 'swift' 8 }, 9 context: { 10 include: [ 11 '**/*.swift', 12 '**/*.storyboard', 13 '**/*.xib', 14 '**/Info.plist', 15 '**/*.xcconfig' 16 ], 17 exclude: [ 18 'Pods/**', 19 'build/**', 20 'DerivedData/**', 21 '*.xcworkspace/**', 22 '*.xcodeproj/**' 23 ] 24 } 25};

Generate CLAUDE.md#

bootspring generate

Example output for iOS:

1# MyiOSApp - AI Context 2 3## Overview 4iOS application built with Swift and UIKit. 5 6## Tech Stack 7- Language: Swift 5.9 8- Platform: iOS 17+ 9- UI: UIKit/SwiftUI 10- Architecture: MVVM 11 12## Project Structure 13- Models/ 14- Views/ 15- ViewModels/ 16- Services/ 17- Resources/

Using with AI Assistants#

Copy Context#

# Copy CLAUDE.md to clipboard cat CLAUDE.md | pbcopy

Then paste into Claude, ChatGPT, or other AI assistants for iOS development help.

Agent Consultations#

1# iOS architecture advice 2bootspring agent invoke architecture-expert "Best practices for iOS MVVM" 3 4# Security review 5bootspring agent invoke security-expert "iOS data storage security" 6 7# Performance optimization 8bootspring agent invoke performance-expert "iOS app launch time optimization"

Common Workflows#

New Feature Development#

1# 1. Start workflow 2bootspring workflow start feature-development 3 4# 2. Add feature task 5bootspring todo add "Add push notifications" 6 7# 3. Generate context 8bootspring generate 9 10# 4. Build in Xcode (Cmd+B) 11 12# 5. Quality check 13bootspring quality pre-commit 14 15# 6. Mark complete 16bootspring todo done 1

Code Review#

1# Run analysis 2bootspring analyze 3 4# Security audit 5bootspring audit --phase=security 6 7# View report 8open planning/AUDIT_REPORT.md

Documentation#

# Generate documentation structure bootspring content new documentation --title "API Reference" # Generate README bootspring content new readme

Automator Integration#

Create Automator workflows for quick access:

Quick Generate#

  1. Open Automator
  2. Create new Quick Action
  3. Add Run Shell Script:
export PATH="/opt/homebrew/bin:$PATH" cd "$SRCROOT" 2>/dev/null || cd "$(dirname "$1")" bootspring generate osascript -e 'display notification "Context updated" with title "Bootspring"'
  1. Save as "Bootspring Generate"
  2. Access via Services menu or keyboard shortcut

Quick Health Check#

export PATH="/opt/homebrew/bin:$PATH" cd "$SRCROOT" 2>/dev/null || cd "$(dirname "$1")" bootspring health

Git Integration#

Pre-Commit Hook#

#!/bin/sh # .git/hooks/pre-commit export PATH="/opt/homebrew/bin:$PATH" bootspring quality pre-commit

Post-Commit Context Update#

#!/bin/sh # .git/hooks/post-commit export PATH="/opt/homebrew/bin:$PATH" bootspring generate --quiet

Xcode + SwiftUI Workflow#

For SwiftUI projects:

1// bootspring.config.js 2module.exports = { 3 project: { 4 name: 'MySwiftUIApp', 5 type: 'swiftui', 6 platform: 'ios', 7 language: 'swift' 8 }, 9 context: { 10 include: [ 11 '**/*.swift', 12 '**/Assets.xcassets/**', 13 '**/Preview Content/**' 14 ], 15 exclude: [ 16 'build/**', 17 'DerivedData/**' 18 ] 19 } 20};

SPM Integration#

For Swift Package Manager projects:

# In Package.swift directory bootspring init # Generate context including Package.swift bootspring generate

CocoaPods Integration#

For CocoaPods projects:

# After pod install bootspring generate # Context excludes Pods/ by default

Troubleshooting#

Command Not Found#

# Add to ~/.zshrc export PATH="/opt/homebrew/bin:$PATH" # Source profile source ~/.zshrc

Build Phase PATH Issues#

Add PATH export at the start of build scripts:

export PATH="/opt/homebrew/bin:$PATH"

Node.js Not Found in Xcode#

Ensure Homebrew's Node is accessible:

1# Check Node location 2which node 3# Should output: /opt/homebrew/bin/node 4 5# In Xcode build scripts, use full path or export PATH 6/opt/homebrew/bin/node --version

Permission Issues#

# Fix permissions chmod +x .git/hooks/pre-commit chmod +x .git/hooks/post-commit

Limitations#

Bootspring is primarily designed for web development. Some limitations with Xcode/iOS:

FeatureSupport
Context generationFull
CLI commandsFull
Agent consultationsFull
Skill patternsLimited (web-focused)
MCP integrationVia Claude Desktop
Quality gatesBasic (no SwiftLint)

For Full iOS Tooling#

Consider combining Bootspring with:

  • SwiftLint - Swift code quality
  • SwiftFormat - Code formatting
  • Periphery - Dead code detection
  • xcbeautify - Build log formatting

Best Practices#

Keep Context Updated#

# Add to your build workflow bootspring generate --quiet

Use for Documentation#

# Generate documentation templates bootspring content new documentation --title "Architecture" bootspring content new documentation --title "API Integration"

Leverage AI Assistants#

Use CLAUDE.md context with Claude, ChatGPT for:

  • Code review assistance
  • Architecture decisions
  • Documentation writing
  • Bug investigation

Next Steps#