Was zu einer .gitignore-Datei für ein Xcode-Projekt hinzugefügt werden soll

Lesezeit: 2 Minuten

Ich habe gerade ein kollaboratives Xcode-Projekt gestartet und stoße auf Probleme mit meinen Mitarbeitern, die unbeabsichtigte Änderungen an ihren Projekten vorgenommen haben. Was sollte ich für ein solches Projekt zu meiner .gitignore-Datei hinzufügen? Ich habe Probleme mit gesehen .xcuserdata nur um ein beispiel zu geben.

Ich habe die von GitHub verwendete .gitignore-Datei eingefügt, Ziel c. Das Elternteil .gitignorieren Das Repository für .gitignore-Dateien ist auch für andere Sprachen sehr nützlich.

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

Es gibt Vorlagen im Internet. Einige der bekanntesten sind

Ich würde vorschlagen, hinzuzufügen .DS_Store auch in Ihre .gitignore-Datei.

1011040cookie-checkWas zu einer .gitignore-Datei für ein Xcode-Projekt hinzugefügt werden soll

This website is using cookies to improve the user-friendliness. You agree by using the website further.

Privacy policy