How do I rename a project in Xcode 5? What steps do I need to take? In the past this was always a very tricky manual process.
8 Answers
Well, the answer is very very very Apple simple in Xcode 5! In the Project Navigator on the left side, click 2 x slowly and the Project file name will be editable. Type the new name. A sheet will appear with a warning and will list all the items Xcode 5 believes it should change. You can probably trust it, but you should inspect it. The list will include the info.plist and various files, but also all the relevant strings from nib/xib files like MainMenu menus.
Accept the changes and you will get the prompt to save a snapshot of the project. Always make a snapshot when Xcode asks, it will be useful to restore if something does not work.

- 12,679
- 6
- 37
- 55
-
Probably because it's actually an awesome and easy process now that is actually discoverable. In Xcode 2 and earlier it wasn't. Don't remember in 3 and 4. Loving 5 – uchuugaka Dec 06 '13 at 09:40
-
lol good point. thanks again! worthwhile related answer for future internauts .. http://stackoverflow.com/questions/17744319/duplicate-and-rename-xcode-project-associated-folders – Fattie Dec 06 '13 at 09:51
-
Sorry to hear that but it isn't always gonna work. That's why Xcode wants you to create a snapshot. Complex build systems and version control, dependencies etc can cause issues. Command K should be your first step. After that read the error messages. They generally help a lot – uchuugaka Jan 25 '14 at 09:06
-
11It worked for me except the double click didn't. I selected the project and hit 'Enter', that worked. +1. – coder Mar 27 '14 at 03:32
-
I did not have any warning and references are not renamed – Pierre de LESPINAY Jun 03 '14 at 17:31
-
I did it its Rename Project name. but it Not rename Rename Project folder. also not deleted all project file(.xcodeproj). I think this is not a good way.. – damithH Jun 04 '14 at 06:42
-
After renaming, if you got the error about provisioning profile... Under the General tap and at the Bundle Identifier label, retype your app prefix again: com.yourcompanyname. Somehow what you see was not what Xcode recognized. – EmilyJ Jun 07 '14 at 13:27
-
After you change your name in the way you describe, do I also need to change my bundle identifier? – Tom Testicool Jul 15 '14 at 15:04
-
You might. It depends on your needs. Your app is known to the system by its bundle identifier (launch services in particular). Display names are just display to users. Project names are for the file system basically. Class and file names are for the Xcode build system. – uchuugaka Jul 15 '14 at 15:38
-
9Besides your answer, I add a new Run Schema (Product > Schema > New Schema) to point to the new target name. – Muhammad Hewedy Sep 06 '14 at 10:11
-
1That's a great comment. Those schemas are a great place to do various things!! – uchuugaka Sep 06 '14 at 10:29
-
Downvoting since this action won't change everything everywhere. You'll still be keeping a lot of references to the old name, like folder names, schema names, etc. Gets even worse if it's a workspace (like when created by cocoapods). The only way I know to totally get rid of the old name is to grep through all the files in the project folder and replace occurrences and then do a recursive search for filenames and rename. In the Terminal, of course. – user3099609 Sep 17 '14 at 09:35
-
That's just anal retentive. The point is renaming a project not trying to rename every instance of a word. Many of those have no bearing on the resulting product. Even project names have little bearing on that. They just make it easier to know what something is on your computer. – uchuugaka Sep 17 '14 at 09:51
-
@MuhammadHewedy - thanks - without this step, was getting linker error! – rysv Jan 20 '15 at 19:51
-
6Note that with Xcode 6.2 (the latest as of this writing) this procedure results in a project that won't build. It fails with a linker error, complaining that it can't find the .app file under the old name. I looked around and can't find the reference to the old app filename, so I am at a loss as to how to fix it. – Duncan C Mar 27 '15 at 14:39
-
5Xcode 6.3.1 crashed twice, while I tried to change the Project's name. And even worse that it had renamed a few things partially. It was good that I am using git, so I just stashed the changes. It is recommended that you manually take a project snapshot before you try this. – Ozair Kafray Apr 30 '15 at 12:23
-
2Xcode 6.3.1 crashed for me as well when tried to change the project's name. – Alex May 11 '15 at 01:02
Change the project name:-
- Click on the target in xcode, on the right in "Identify and Type" under name change the name and press the ENTER button on your keyboard.
- A window will appear confirming the change and what it will change. Once you confirm it will make the changes.
Change the root folder name:-
- Go to the project directory and rename the root folder,
- Open the project and u will find all the file are missing, u need to add all the files of project again
- Right click the project bundle .xcodeproj file and select “Show Package Contents” from the context menu. Open the .pbxproj file with any text editor. 4>Search and replace any occurrence of the original folder name with the new folder name. 5>Save the file.
Change the Scheme name:-
- rename .xscheme file
If your Project is static framework then make sure your header file has public target membership

- 108,386
- 14
- 159
- 186

- 250
- 2
- 2
-
Thanks for adding the info about renaming the root folder at the system level and instances. The first responder didn't mention that. I wonder if for the purposes of submitting an app to the Store it doesn't matter (after reading his Jan 16 comment below). I'm about to submit and very worried about fouling up my project. Wish Apple made this easier; projects spawn out of random work. – user3741598 Jul 31 '14 at 16:32
-
1One further note: if you rename the CoreData file, you need to remove it from your project, then re-add it. Without this, I found my app would crash whenever it tried to access it. – Mike Gledhill Mar 25 '15 at 10:15
-
Another note: crap... renaming your XCode project seems to completely mess up Source Control. XCode suddenly has no history of your files/projects. Man, I loathe XCode..,,, – Mike Gledhill Mar 30 '15 at 08:40
-
Thanks for the answer! About missing files and re adding them into project, just don't add files directly to the project, create a group related to a folder, and always add files to that folder. After renaming project root folder you will only match the group and folder. – Annie May 13 '16 at 07:32
I really recommend just opening the folder in a general editor such as Sublime Text, and doing a find/replace across the whole folder. The other methods I found were unstable, particularly when combined with .xcworkspace and cocoapods.

- 553
- 1
- 6
- 17
-
+1 for suggesting manual approach. Things that are "Apple simple" not always are "Apple stable". Relying on xcode in this one creates mess, which would take more time to clean up rather that doing it manually. – user1244109 Aug 25 '15 at 21:08
-
How to do this: go to "Find" on the top option bar, go to "Find in Files..." , http://docs.sublimetext.info/en/latest/search_and_replace/search_and_replace_files.html#searching – yvanscher Jan 07 '16 at 02:57
In Xcode 8.0, to rename your project, just go through the following instructions as described in Xcode help:
1- Select your project in the project navigator.
2- In the Identity and Type section of the File inspector, enter a new name into the Name field.
3- Press Return.
A dialog is displayed, listing the items in your project that can be renamed. The dialog includes a preview of how the items will appear after the change.
4- To selectively rename items, disable the checkboxes for any items you don’t want to rename. To rename only your app, leave the app selected and deselect all other items.
5- Click Rename.

- 6,030
- 2
- 23
- 36
Xcode 6 (beta 6 as of now) seems to be not very reliable with renaming projects. For me it didn't rename several of the files and groups. It also doesn't rename the physical folder the project is in. To rename my project to be sure that everything is clean I went the extra length to create a new project with the new name and copy over all the files. The assets are easy to copy but groups have to be recreated. The biggest issue with this however are CoreData data model files. Trying to simply copy this will result in a corrupt model file, even though everything looks like it is alright.

- 9,416
- 14
- 78
- 129
-
1Now there is Xcode 6 too in this post! Besides, Xcode 5 behaved similarly unreliable for me. Just mentioning here that Xcode 6 is not reliable for renaming either. – BadmintonCat Aug 23 '14 at 08:20
-
The 5 in reliability issue is interesting. Have you filed a bug? It's possible something in the data model file isn't getting updated. – uchuugaka Aug 23 '14 at 08:52
-
Xcode 6.3.1 crashed twice, while I tried to change the Project's name. And even worse that it had renamed a few things partially. It was good that I am using git, so I just stashed the changes. It is recommended that you manually take a project snapshot before you try this. – Ozair Kafray Apr 30 '15 at 12:23
-
Happened the same @OzairKafray says. I had to download the code from Git again... Xcode 6 aswell. – aramusss Jun 14 '15 at 10:45
When you re-name the project name in XCode5 then info.plist entry removed from Targets --- > General ---> identity. You just need to mention it again.

- 1,298
- 16
- 28
-
-
@uchuugaka I am using XCode Version 5.0 (5A1413); Its produced here for two times. Also, old info.plist not removing from project hierarchy. We need to delete old one and then add renamed info.plist file. Its present in Finder but not in hierarchy. – msmq Jan 17 '14 at 10:19
In Xcode 7, renaming a project can still break your app. Make sure you backed it up before trying it. Click on the project icon and find the project name in the inspector pane. If you change it there, Xcode will ask you if you want to rename related files. Might work. But if not, try this brute force approach:
- Close Xcode
- Using an advanced text editor like Sublime Text or Atom, open the root folder. It will open the folder structure.
- Perform a Global Search and Replace (it's probably
cmd + shift + f
), and replaceMy Wrong App Name
withNew App
. If your project name contained spaces, also search forMy_Wrong_App_Name
and replace withNew_App
. This changes all file contents. - Now you need to find all the files inside the project with your old app name. Rename them all, also the folders.
- Important: Open the project file with right click > Show Package Contents, and rename all files in there.
- Reopen your Xcode project or workspace. Compile.
If you use Pods, you need to open the pods project as well and change the files in there.

- 668
- 1
- 6
- 21