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.