Home > Software engineering >  XCode and Swift files for version control
XCode and Swift files for version control

Time:10-20

So I have a .gitignore created, which I have basic files included in there, but when it comes to a Swift and .xcodeproj project..

Which one of these files are the only ones that I need inside Github?
enter image description here

CodePudding user response:

Actually, you need both .pbxproj and .xcworkspace, however, it depends:

  1. .pbxproj file contains metadata, file references, configuration... which use to execute/build the project.
  2. .xcworkspace contains and manages subprojects. A common scenario is using cocoapods. If you're developing a small project that's don't need to depend on any 3rd parties, you don't have to create xcworkspace.
  3. xcuserdata folder is safe to ignore. It contains some temporary info like user state, files opened, folders opened.
  • Related