Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should XCSharedData be checked into Git Repo for Xcode project?

I just made some changes and I see a pending file that has not been added to the repo. The filenames path is */xcshareddata/IDEWorkspaceChecks.plist. Can someone explain the reason for this file and why or why not it needs to be added to the repo?

like image 241
Esko918 Avatar asked Oct 28 '18 17:10

Esko918


People also ask

How sync Xcode project to GitHub?

for xcode 9, just go to the source control tab in the navigation inspector in Xcode. right click on the master git and select create "Your project name" remote on GitHub. give your GitHub credentials and give a name to git repo and Xcode will create and push your code for you.

What is Xcshareddata?

The xcshareddata directory is primarily used to store shared settings (as opposed to xcuserdata which is used for settings which are not shared a.k.a. user specific).


1 Answers

The files in xcshareddata/ should be added to the repo (but not the ones in xcuserdata/):

Xcode 9.3 adds a new IDEWorkspaceChecks.plist file to a workspace's shared data, to store the state of necessary workspace checks. Committing this file to source control will prevent unnecessary rerunning of those checks for each user opening the workspace. (37293167)

https://developer.apple.com/library/archive/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html


Regarding Xcode 9 and newer, the only line you really need in your .gitignore is:

xcuserdata/ 

Nothing else for Xcode 9+. Whatever other lines you have in your .gitignore should be only added for your specific needs, not because you found an obsolete .gitignore sample on the internet. :)

like image 86
Cœur Avatar answered Sep 24 '22 01:09

Cœur