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 --versionInstalling Bootspring#
npm install -g @girardmedia/bootspring
bootspring --versionIntegration Methods#
Method 1: Terminal Tab#
Use Xcode's built-in terminal:
- Window → Organize Terminal
- Open a new terminal tab
- Navigate to your project directory
- Run Bootspring commands
cd ~/Developer/MyApp
bootspring init
bootspring generateMethod 2: Build Phase Scripts#
Add Bootspring commands to build phases:
- Select your target in Xcode
- Go to Build Phases
- Click + → New Run Script Phase
- Add Bootspring commands
Generate context on build:
# Run Script Phase
export PATH="/opt/homebrew/bin:$PATH"
bootspring generate --quiet || trueQuality check before archive:
# Run Script Phase (Archive only)
export PATH="/opt/homebrew/bin:$PATH"
if [ "$CONFIGURATION" = "Release" ]; then
bootspring quality pre-deploy || exit 1
fiMethod 3: External Build Tools#
Use Xcode's External Build System for Bootspring workflows:
- File → New → Project
- Choose External Build System
- Set build tool to Bootspring
Context Generation#
Initialize Project#
cd /path/to/XcodeProject
bootspring initSwift/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 generateExample 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 | pbcopyThen 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 1Code Review#
1# Run analysis
2bootspring analyze
3
4# Security audit
5bootspring audit --phase=security
6
7# View report
8open planning/AUDIT_REPORT.mdDocumentation#
# Generate documentation structure
bootspring content new documentation --title "API Reference"
# Generate README
bootspring content new readmeAutomator Integration#
Create Automator workflows for quick access:
Quick Generate#
- Open Automator
- Create new Quick Action
- 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"'- Save as "Bootspring Generate"
- 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 healthGit Integration#
Pre-Commit Hook#
#!/bin/sh
# .git/hooks/pre-commit
export PATH="/opt/homebrew/bin:$PATH"
bootspring quality pre-commitPost-Commit Context Update#
#!/bin/sh
# .git/hooks/post-commit
export PATH="/opt/homebrew/bin:$PATH"
bootspring generate --quietXcode + 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 generateCocoaPods Integration#
For CocoaPods projects:
# After pod install
bootspring generate
# Context excludes Pods/ by defaultTroubleshooting#
Command Not Found#
# Add to ~/.zshrc
export PATH="/opt/homebrew/bin:$PATH"
# Source profile
source ~/.zshrcBuild 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 --versionPermission Issues#
# Fix permissions
chmod +x .git/hooks/pre-commit
chmod +x .git/hooks/post-commitLimitations#
Bootspring is primarily designed for web development. Some limitations with Xcode/iOS:
| Feature | Support |
|---|---|
| Context generation | Full |
| CLI commands | Full |
| Agent consultations | Full |
| Skill patterns | Limited (web-focused) |
| MCP integration | Via Claude Desktop |
| Quality gates | Basic (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 --quietUse 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#
- Terminal Usage - CLI workflows
- Claude Desktop - MCP integration
- Understanding Context
- Using Agents