Overview
iOS development validation with Xcode build hooks for Claude Code.
Features
- Automatic build validation: Ensures your iOS project compiles after agent changes
- Smart caching: Only builds when Swift, Objective-C, or project files have changed
- Simulator build: Uses iOS Simulator to avoid code signing requirements
Installation
han plugin install ios
Hooks
build (Stop hook)
Automatically runs when you stop Claude Code to ensure the iOS project builds:
- Detects directories containing
.xcodeprojor.xcworkspace - Only runs if Swift, Objective-C, XIB, Storyboard, or project files have changed
- Builds for iOS Simulator (no code signing required)
- Auto-detects the first available scheme
Configuration
You can customize the hook behavior in your project's han-config.yml:
ios:
hooks:
build:
enabled: true
# Override with a specific scheme and destination
# command: "xcodebuild -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 16' build CODE_SIGNING_ALLOWED=NO"
To disable the hook for a specific project:
ios:
hooks:
build:
enabled: false
Requirements
- macOS with Xcode installed
- Xcode Command Line Tools (
xcode-select --install) - iOS Simulator runtime
Notes
- The build uses
CODE_SIGNING_ALLOWED=NOto skip code signing - Build output is limited to the last 20 lines to keep hook output concise
- For workspaces with CocoaPods, ensure
pod installhas been run
Related Plugins
- swift: Swift language skills and SwiftLint validation
- objective-c: Objective-C development skills