Introduction
An .xcworkspace gathers several
Xcode projects and other files so that
Xcode opens and builds them together.
Finder shows it as one file, but it is a folder. Every .xcodeproj also has
an implicit one inside it, at project.xcworkspace.
A workspace’s contents.xcworkspacedata dropped on this site opens in the
explorer, and an .xcworkspace folder dropped whole is named as a
workspace with the projects it lists.
Structure
The folder holds contents.xcworkspacedata, an XML file whose
Workspace root lists what the workspace contains:
| Element | Attributes | Meaning |
|---|---|---|
Workspace | version | The root; version 1.0. |
FileRef | location | A project or file in the workspace. |
Group | location, name | A folder of references in Xcode’s navigator; it holds more FileRef and Group elements. |
A location is a kind, a colon and a path. group: is relative
to the enclosing group, container: is relative to the folder holding the
workspace, self: is the workspace itself, and absolute: is a
full path.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace version = "1.0">
<FileRef location = "group:App/App.xcodeproj"></FileRef>
<FileRef location = "group:Kit/Kit.xcodeproj"></FileRef>
</Workspace>
Beside it, xcshareddata holds settings and shared
schemes, and
xcuserdata holds each person’s own state, which is usually left out of
version control.
Links
Software
- Xcode – Apple’s IDE, which makes and opens workspaces (macOS)