Skip to content

Remove *.xcscheme from Global/Xcode.gitignore,Objective-C.gitignore and… #1761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2015

Conversation

nrbrook
Copy link
Contributor

@nrbrook nrbrook commented Nov 19, 2015

… Swift.gitignore

Xcode schemes should be held under source control when shared. When not shared they are stored in xcuserdata, so are already ignored. Therefore ignoring *.xcscheme is incorrect, as far as I'm aware.

@nrbrook nrbrook changed the title Remove *.xcscheme to Global/Xcode.gitignore,Objective-C.gitignore and… Remove *.xcscheme from Global/Xcode.gitignore,Objective-C.gitignore and… Nov 19, 2015
@shiftkey
Copy link
Member

@nrbrook do you have a supporting link which discusses this? I'd love something (semi-)official to point other curious people to...

@nrbrook
Copy link
Contributor Author

nrbrook commented Nov 19, 2015

There is nothing specific, but some references to sharing schemes in Apple's documentation.

https://developer.apple.com/library/ios/recipes/xcode_help-scheme_editor/Articles/SchemeShare.html

To automate an integration, you share its scheme, commit it with your project to a source repository...

https://developer.apple.com/library/ios/recipes/xcode_help-scheme_editor/Articles/SchemeManage.html

Shared. Specifies that the scheme is visible to anyone using that project or workspace (depending on where the scheme is stored). If you designate a scheme as shared, be sure to check with others who use the project or workspace before modifying or deleting it.

@shiftkey
Copy link
Member

So sharing this file seems like something that should be opt-in (either explicitly add the file or delete the line from the gitignore file) because perhaps people don't want to share these schemes.

Instead of removing this rule, should keep it around and annotate it to explain when you should be committing this file?

@nrbrook
Copy link
Contributor Author

nrbrook commented Nov 19, 2015

'Sharing' is opt-in – schemes by default are not shared, and are stored in xcuserdata directory, which is ignored already here. But when you enable sharing on a scheme, Xcode moves it to the xcshareddata directory, and it should be committed. As far as I'm aware, xcschemes are only placed in those two locations. As such, the wildcard to ignore all scheme files is unnecessary.

The most popular answer on stack overflow does not ignore *.xcscheme.

http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects

@shiftkey
Copy link
Member

@nrbrook thanks for the extra context!

shiftkey added a commit that referenced this pull request Nov 19, 2015
Remove *.xcscheme from Global/Xcode.gitignore,Objective-C.gitignore and…
@shiftkey shiftkey merged commit 1d4117f into github:master Nov 19, 2015
u9E9F pushed a commit to u9E9F/gitignore that referenced this pull request Jul 8, 2017
Remove *.xcscheme from Global/Xcode.gitignore,Objective-C.gitignore and…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants