.xcworkspace显示包内容后共有3大块内容,如下图所示
这里有关于.xcworkspace的一小段英文解读
contents.xcworkspacedata
lists the projects that are included as top-level entities in your project
该文件打开后的内容如下,我个人理解是Workspace包含的顶级文件/目录
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Elemeiyou.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
xcshareddata文件夹
which is data shared by users who share a project, and should be under source control.
顾名思义就是共享的数据,其中有个文件IDEWorkspaceChecks.plist
比较特殊,经过查阅资料发现官方有个解释
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)
xcuserdata
which contains each user's settings (should be ignored for source code controL)
这个是保存跟用户相关的一些信息,比如下图中的这个文件,保存的是xcode相关的一些配置
关于Git
- xcuserdata目录下的文件不应该加入到版本控制(Objective-C语言下的.gitignore自动添加该文件夹)
- 其他两个文件(夹)最好加入到版本控制