XcodeGen is a command-line tool written in Swift that generates Xcode project files (.xcodeproj) from a declarative YAML or JSON specification (typically project.yml). It eliminates the need to manually manage Xcode project files by deriving the project structure from the filesystem and a concise spec, supporting all major Apple platforms (iOS, macOS, tvOS, watchOS, visionOS) and a wide range of product types including applications, frameworks, libraries, extensions, App Clips, and more. The tool integrates with Swift Package Manager, Carthage, and CocoaPods, and can generate schemes, breakpoints, Info.plist files, and build settings from layered presets. The architecture is modular: the ProjectSpec module defines the domain models and parsing logic for the spec format; XcodeGenKit contains the core generation logic (PBXProj generation, scheme generation, source file organization, settings resolution); XcodeGenCLI provides the command-line interface using SwiftCLI; and XcodeGenCore offers utility components like globbing, atomic properties, and path extensions. The tool is designed for automation and CI workflows, with caching support and pre/post generation commands. The codebase is well-structured with clear separation of concerns, extensive test coverage (unit tests, fixture-based golden tests, performance tests), and active maintenance. It demonstrates strong Swift engineering practices including protocol-oriented design, value types, and functional patterns. While the project is mature and widely adopted (over 8,800 stars), some areas like test fixtures are large and tightly coupled to specific Xcode versions, requiring periodic updates.
This repository contains a tool named `xcdiff` for comparing two Xcode project files (.xcodeproj) and outputting their differences in multiple formats. It is designed as both a command-line utility and a reusable Swift library (XCDiffCore). The tool analyzes structural and configuration differences between projects, including targets, sources, headers, resources, build settings, and dependencies. The architecture follows a modular, plugin-like design where each aspect of the project comparison is handled by a separate comparator implementing a common protocol. This allows for easy extension with new comparison types. Results are rendered through a similarly abstracted renderer system, supporting output formats such as plain text, JSON, markdown, and HTML. The tool is actively maintained and keeps pace with evolving Xcode project formats, as evidenced by fixtures for recent Xcode features like synchronized groups.