简体   繁体   中英

XCode accidently added my project to folder

I accidentally added my project to a folder. How can I undo this? Here's the image describing what i have done:

在此处输入图像描述

Thanks.

UPDATE: I dragged it out, it asked me to save a new workspace (don't know what that means) and now it's fixed, but on top it looks like this:

在此处输入图像描述

Although it compiles/works fine, this isn't normal and bugging me. Please help.

I've run into the same accidental situation. When it creates the project workspace, it adds the "unititle" project workspace at the top level and an ADDITIONAL project workspace file within the project files. Delete both workspace files and the newgroup folder and restart xcode. Hopefully that works anyone in need.

I have replicated this.

Now that you have a new workspace:

  • Drag your project out of the group ( folder )
  • Quit Xcode
  • Navigate to where the workspace and project are located
  • Delete the workspace file (.xcworkspace )
  • Re-open Xcode by double clicking the project file (.xcodeproj )

BTW, workspaces are pretty cool. You can nest multiple projects within a single workspace.

I had the same problem while I happened to have git(version control system) enabled. I tried to commit local changes, right clicked on the "workspace" file which by comparison you can see it's now under an "untitled" group, right clicked and reverted that file itself, and it's fixed.

I had this when I move my project from Dropbox to the local FS. Somehow all the files point to the local FS, but not the main top xcworkspace in XCode, that was still pointing to Dropbox.

So in XCode I change it's location in "Identity and Type" in the right pane, to the local project folder where the xcworkspace file was. This gave me the folder view in the top like you have.

I could only solve it by manually editing the contents.xcworkspacedata on the local FS;

location = "group:">

location = "group:/Users/rbollen/Downloads/myApp/myApp.xcodeproj">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM