Reputation: 5523
I just created a group and want to rename it but getting unable to update popup. I know how to rename it from show in finder. but y Apple in Xcode 10.2 does not allowed it directly from Xcode?
Or
Upvotes: 34
Views: 11504
Reputation: 7916
First Restart Xcode. If restart doesn't work then check that is same group name already exist inside folder. If group exist then delete it. Hope this two process will help to solve this issue.
Upvotes: 0
Reputation: 677
Ok... When you create a group it also creates a folder there. If you delete the group, the folder will not be deleted. Then if you change your mind and create the group again, it will try to create the folder again. But since the folder exists, the OS will throw an error which Xcode just reports as an inability to create the group.
So just rename or delete the underlying folder and now you can rename the group. You can rearrange the files in Finder after that.
Upvotes: 0
Reputation: 847
I think 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?
cd ~/../parent
or just right click parent directory and choose New Terminal at Folderrm -rf MyGroup
Now you can try to create your group with MyGroup name.
Upvotes: 0
Reputation: 2490
I just checked and found another way without restarting Xcode.
I have the same issue. @ravin001 i did the same thing as you and quit and restarted Xcode but i found another way.
• Go ahead and Right Click
wherever you want to create the Folder/Group.
• Select New Group
.
• Press Enter
to name the Folder/Group whatever Xcode suggested (usually "New Group").
• Now make sure the new Folder/Group is selected and Open the inspector panel
.
Inspector Panel: top most right corner.
• The little page "file inspector" should be highlighted. If not, select it.
Trying to rename it won't work, First you have to rename the folder wherever it's stored.
- To do so:
• In the inspector panel, underneath the "location" title, you should see a folder icon. Click on that folder icon
.
• Xcode will open a "choose a location" folder structure widget right in the middle of the screen.
• Right Click
on the "New Group" folder and Rename it to whatever you want
.
• Click on the 'Choose' button
to close the widget ("It's important to select choose")
Now you rename the folder to whatever you like in Xcode
NOTE
• Renaming the folder any other way other than through the "Choose a location" way, won't work and you still won't be able to edit the folder
• You'll need to do this for every folder you create. So if you just created the project and will be adding a lot of folders, then it's probably best to restart xcode
Upvotes: 28
Reputation: 1045
In my case the folder was already created on the filesystem but it wasn't showing on the Project Navigator.
I only had to change the location of the "New Group" folder using the folder icon on File Inspector tab.
Upvotes: 1
Reputation: 275
i am also facing this issue. What works for me is Force Quit Xcode and restart it. Also make sure that your group should be in Right path by Right Clicking and show in Finder option.
Upvotes: 2
Reputation: 118
If you just created this group and you know for sure that the name wasn't already used in this project... Make sure the folder is not open.
You do this but looking to the left side of the folder(there is a triangle/arrow) if the triangle is pointing down, this means the folder is open and Xcode won't allow you to rename the folder.
Simply press the triangle to close it (it will be pointing towards the right when closed) and try to rename again.
You shouldn't have to exit out of Xcode!!!
See next to "New Group" the arrow is pointing down
Tap on the arrow and it will point to the right
Now you are able to change the name to Controller
Let me know if this solved you issue.
Upvotes: 2
Reputation: 603
I was seeing this problem today. After further investigation I determined it was due to already having folders in that directory using the same names. This was caused by creating a Group in Xcode but reverting my git changes, which didn't revert the folder creation only the Xcode Project File changes.
Check in Finder that the folder/group names are unique.
Upvotes: 18
Reputation: 661
I was facing the same issue today. Only thing which helped me was quitting the Xcode and restarting it. It is working for me now
Upvotes: 48