How can I delete an Xcode workspace?
Asked Answered
G

2

6

I've got an Xcode project, in an Xcode workspace. At one point, I thought I wanted a workspace, so I added one, but it turns out I'm not doing anything which can benefit from that, and I'd rather not have that extra layer of complexity.

How can I delete the workspace, so I have just a plain project again?

I found some web pages that say a workspace is just a set of pointers to projects, but there also must be pointers back from the project to the workspace. When I try deleting the .xcworkspace directory, I get build errors with the project (files in the workspace not found).

Godinez answered 23/12, 2016 at 7:1 Comment(0)
G
3

I think I figured out the trick. For project "Foo" in workspace "Bar":

  • Delete the Bar.xcworkspace directory
  • Delete the Foo.xcodeproj/project.xcworkspace/xcuserdata/myname.xcuserdatad/UserInterfaceState.xcuserstate file
  • In Foo.xcodeproj/project.pbxproj, delete the "PBXContainerItemProxy" section
Godinez answered 23/12, 2016 at 18:9 Comment(0)
C
2

I used this procedure for XCode 12.4, April 2021

  1. Close XCode
  2. Delete the main .XCWorkspace file
  3. Delete the following files. Note the first two will come back when you restart XCOde:
  • project.xcodeproj/project.xcworkspace/contents.xcworkspacedata.
  • project.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist.
  • project.xcodeproj/xcuserdata/steve.xcuserdatad/xcschemes/xcschememanagement.plist
Cymatium answered 21/4, 2021 at 20:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.