mikywan
mikywan

Reputation: 1505

XCode 4: Problem deleting project files within a project

I am using XCode 4. Some time ago I added two sample projects to my main project. I didn't save it as workspace so al three projects are in the same one. The problem is that I cannot delete the sample projects from my main project. When I right click one of them, the delete option is disable. If I press CMD+Delete or Delete nothing happens.

Thanks in advance.

Upvotes: 3

Views: 4011

Answers (4)

Robin
Robin

Reputation: 10011

I know that this question is quite old, but I can tell that no one has got the answer to this question for a very long time so the following simple steps will get the work done.

1- open up your .xcodeproj file in finder by right clicking on it and then selecting "show package contents".

2- delete the .xcworkspace file from the .xcodeproj package (dont worry it will come back once you start the project in later versions of xcode 4.0).

3- open the .xcodeproj in xcode 4.0 or later and vola.

According to my understanding the problem was caused by .xcworkspace file so deleting it was the perfect solution to this kind of problem.

Enjoy.

Upvotes: 1

user913350
user913350

Reputation: 11

I had the same problem. On the far right, click on "Organizer". In the "Organizer", click on the Projects icon and then right click on the project you want to delete. Click on "Reveal in Finder". You will then be in the project directory in Finder. Go up one directory and delete the project. The next time you start Xcode, the project should be gone.

Upvotes: 1

antalkerekes
antalkerekes

Reputation: 2128

It is probably a bug, but the Delete option is only active if you are working in an Xcode workspace, and not when opening a project file directly.
Start off by creating a new workspace in Xcode 4 (File > Save As Workspace), then you can add/remove projects as necessary.

Upvotes: 1

Edward Ashak
Edward Ashak

Reputation: 2441

XCode 4 is full of new features and also new bugs. For now I would suggest you create a new project and drag-copy only the files you need in your project.

Upvotes: 0

Related Questions