Renaming projects in Xcode 4

2019-01-05 07:35发布

I must be missing something obvious, but I can't figure out how to rename my project in Xcode 4.

If I remember correctly Xcode 3 had a dedicated menu item for this but there's no such entry in Xcode 4.

标签: xcode4
11条回答
小情绪 Triste *
2楼-- · 2019-01-05 08:01

Renaming the project is really the best way to go.

Here's what I do In Xcode 4.3.2:

  • Duplicate original project in finder
  • Open the project file in the new folder.
  • Select project (little blue icon)
  • Click again and enter new project name. This makes reasonable choices like changing the target, changing the project filename and all appropriate references.

I make custom accessories with a bunch similar backend frameworks and icons. Nothing is perfect but this is a fast way to save a bunch of configuration clicks when apps have a lot of similarities.

查看更多
唯我独甜
3楼-- · 2019-01-05 08:02

There is one other way.

To rename a project in Xcode 4, select the project file from the project navigator on the left side of the project window. Choose View > Utilities > File Inspector to open the file inspector on the right side of the project window. At the top of the file inspector is the Project Name text field. Enter a new project name and press the Return key or the Tab key.

A sheet opens asking if you want to rename the project content items. Click the Rename button to finish renaming the project.

查看更多
祖国的老花朵
4楼-- · 2019-01-05 08:07

I encounter this problem too. What I do is that I just change the name of TARGETS. Then the name displayed on iPhone or simulator changes. The names of files in project don't change. Just try this way.

查看更多
做自己的国王
5楼-- · 2019-01-05 08:08

Another option - Move the cursor on project name. Hit Enter. The project name becomes editable.

查看更多
时光不老,我们不散
6楼-- · 2019-01-05 08:09

In addition to renaming the project, you may want rename the scheme so that it matches your new project name.

Xcode scheme name

To change the name of your scheme:

Product ==> Manage Schemes...

Then select your scheme and hit return/enter to edit the name.

Alternatively, Product ==> New Scheme... to create a new one with your new name :)

查看更多
登录 后发表回答