max_
max_

Reputation: 24521

Unable to rename a group folder in Xcode

I added a new group from selection today in Xcode containing several files. For some reason, this has consisted for a while, I am unable to name or rename the group folder.

Has this happened to anyone else before, if so have you come across a fix?

Upvotes: 24

Views: 12097

Answers (5)

Hossein
Hossein

Reputation: 867

Some times its not related to xcode, its finder problem, because directory still exists and finder doesn't show that, you can see directory exists by entering ls in terminal.

How to solve this?

Open terminal and navigate to parent directory of desired directory : cd ~/../parent or just right click parent directory and choose New Terminal at Folder Remove desired directory : rm -rf MyGroup Now you can try to create your group with MyGroup name.

Upvotes: 0

Peng in
Peng in

Reputation: 119

You cannot rename the folder probably because that folder already exists in that directory.

To solve it:

  1. Select the folder you want to rename, press the right button, press show in finder.
  2. Delete the folder(s) that already have the name you want.
  3. Go to Xcode and try again.
  4. Good luck :)

Upvotes: 1

scord
scord

Reputation: 1395

For anyone that has my issue: Check your files in Finder. I had a folder that was already using that name. Delete that folder and it will allow you to change name.

Upvotes: 5

Dev Vanana
Dev Vanana

Reputation: 467

Sometimes it happens.

Workaround:

  1. Quit Xcode.
  2. Launch Xcode. Tada

Upvotes: 21

Paul.s
Paul.s

Reputation: 38728

What have you tried to do in order to rename it?

The contextual menu (right click) does not provide a rename option. Therefore I either

  1. Select the group
  2. Hit return which selects it for editing

OR

  1. Select the group
  2. After a short delay (long enough to not count as a double click) click it again

Upvotes: 40

Related Questions