简体   繁体   中英

Changing the folder name in Xcode

屏幕截图

Is it possible to change the name of target ? For example, as shown in image, "Wonder Cars" to "Anything Else"?

Yeah you can change the name of the Target by doing the following Steps...

  1. Select the new target in the TARGETS list. Press Enter to edit the text and put a more appropriate name.

  2. Next, go to “Manage Schemes…”, select the new scheme you created in step 1 and press “Enter”. Make the scheme name the same as the new target name (which is the one you choose for the new target.)

Click on your project (in your image, the "AccessBox" entry in the list). You might need to open the left sidebar in the project settings: you have a kind of "tab bar" with entries like "General", "Capabilities", "Info", etc. On the the left side of this bar is an icon that like a square with a thick line at the left side. If you click that, a list of your targets appears.

In that list, simply click on a target, then click it a second time like you do in Finder to rename a file.

Please try with below step -

  1. Click on your target and create new scheme from old one .

在此处输入图片说明

Or

You may go to Manage Scheme and create duplicate one from old target

  1. Select the folder you want to rename
  2. Right click on it to show a quick menu, and select "Show in Finder"
  3. Rename the folder name as you want (select the folder, press return ).
  4. After renaming, the reference in Xcode will looks like deleted in red color. Select that folder again, Cmd Delete to remove the reference ("Remove Reference", not "Move to Trash"). Then press Opt Cmd a to add back your renamed folder there again.

Btw, @shruti's solution below

You mean to say you want to change the name of the group. click it once then click it again but not too fast give a little gap between two clicks or click it once then in the file inspector you can change the name

will only rename it in Xcode, but the real folder name won't be changed.

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