.gitignore Builder for iOS / Xcode

Generate a .gitignore for iOS and macOS Xcode projects

Build a .gitignore for iOS and macOS Xcode projects. Covers DerivedData, xcuserdata, Pods, Carthage, the SwiftPM .build directory and Fastlane output, then copy or download in your browser.

Why ignore the DerivedData folder?

DerivedData holds Xcode build intermediates, indexes and module caches that are rebuilt from your source on every compile. It is large, machine-specific and should never be committed.

A .gitignore builder for iOS and macOS projects developed in Xcode. Pick your dependency manager and tooling, and the tool assembles the right ignore patterns for build artifacts, per-developer settings and CI output into one labelled file.

How it works

Each toggle adds a curated block of patterns under a # Header comment. The Xcode block ignores the DerivedData/ build cache, user state files like *.xcuserstate, and packaged *.ipa and *.dSYM artifacts. The dependency blocks handle the three common managers: Pods/ for CocoaPods, Carthage/Build/ for Carthage, and .build/ plus .swiftpm/ for Swift Package Manager. Workspace and Fastlane blocks cover per-developer settings and CI report output.

What gets ignored

DerivedData/ and build/ hold compiled output and are always excluded. The workspace block ignores xcuserdata inside .xcworkspace and .xcodeproj, keeping only the shared project structure tracked. The Fastlane block ignores generated report.xml, Preview.html and screenshot output so automated runs do not pollute the repo.

Tips

Place the file at the root of your repository. Decide as a team whether to commit Pods/ — ignoring it keeps the repo lean but requires pod install after clone. For app targets, commit Package.resolved to pin SPM dependency versions; for reusable packages, ignore it. If a build file is already tracked, run git rm --cached <file> and commit so the ignore rule applies.