将 Xcode 工作区方案添加到版本控制
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7144316/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Adding Xcode Workspace Schemes to Version Control
提问by Nikolozi
I'd like to share Workspace Schemes that I've created with the other team members. However they are all stored under .xcodeproj > xcuserdata > .xcuserdatad > xcschemes. I've set xcuserdata folders to be ignore in SVN as I assumed all data in that folder were user specific.
我想与其他团队成员共享我创建的工作区方案。但是,它们都存储在 .xcodeproj > xcuserdata > .xcuserdatad > xcschemes 下。我已经在 SVN 中将 xcuserdata 文件夹设置为忽略,因为我假设该文件夹中的所有数据都是特定于用户的。
Is there a way around this? i.e I don't want the schemes to be user specific. Or should I check the xcschemes folder in anyway. And if I do that will the other users be able to see and use my schemes?
有没有解决的办法?即我不希望方案是特定于用户的。或者我应该检查 xcschemes 文件夹。如果我这样做,其他用户是否能够看到并使用我的方案?
回答by Joshua Nozzi
Choose Manage Schemes from the Schemes control. Check "Shared" beside any schemes you'd like to share. The schemes will be moved into a folder called "xcshareddata".
从方案控件中选择管理方案。在您想要共享的任何方案旁边选中“共享”。这些方案将被移动到一个名为“xcshareddata”的文件夹中。
Update:This works the same for Xcode 4-8.
更新:这适用于 Xcode 4-8。
回答by nathanwhy
You'll need to go into the "Manage Schemes" view and check off the 'Shared' checkbox ('Product' menu -> Scheme -> Manage Schemes...).
您需要进入“管理方案”视图并勾选“共享”复选框(“产品”菜单 -> 方案 -> 管理方案...)。
Next, You'll need to remove 'xcshareddata/xcschemes' from your ignore file and add them to the repo (or just use 'git add -f MyProject.xcodeproj/xcshareddata/xcschemes')
接下来,您需要从忽略文件中删除“xcshareddata/xcschemes”并将它们添加到存储库中(或仅使用“git add -f MyProject.xcodeproj/xcshareddata/xcschemes”)