115

I have developed my app in Xcode for iPhone, in start I have just named it without secnec now I want to change my app name I have replace my old app name with new one as I have found the name in my app, but its still giving me one error...

Desktop/New name/old name_Prefix.pch: No such file or directory

when I have change oldname_prefix.pch with newname_prefix.pch ..

Cœur
  • 37,241
  • 25
  • 195
  • 267
Haseeb
  • 1,185
  • 2
  • 8
  • 12
  • Do you want to change the application name or project name? Its confusing that title is "XCode Project name" and your description says "app name".......... – Satyam Feb 10 '11 at 06:27
  • Possible duplicate of [How do I rename a project in Xcode 5?](http://stackoverflow.com/questions/19442867/how-do-i-rename-a-project-in-xcode-5) – Emil Laine Jun 23 '16 at 11:15

18 Answers18

258

For Xcode 4 or later:

  • Open a project
  • Select Project Navigator
  • Highlight project name
  • Single click on project name

Screenshot of the Project Navigator

For Xcode 3:

  • Open a project > Menu > Project > Rename ...
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
ohho
  • 50,879
  • 75
  • 256
  • 383
  • 1
    Don't see this option in the menu. – Raffi Khatchadourian Dec 16 '11 at 18:48
  • For anyone like me ..It will take some time so be patient. Don't get panic coz it seems you lost your project at first!! – Dolo Apr 17 '14 at 11:43
  • Note: this isn't a one step process. Immediately after you will have to go into the nitty gritty of editing your schemes, etc. – daspianist Sep 11 '14 at 17:27
  • Be careful, I found this changed the sizes of images and a lot of textures could not be sourced, undid the change and followed the answer below: change Bundle Display name – dancingbush Dec 06 '14 at 17:09
48

There is no need to change the name of the project in order to change the display name of the application (which is what you see on the home screen of the iOS device, in iTunes, etc.). Simply change the "Bundle display name" in your info.plist from the default "${PRODUCT_NAME}" to whatever you want it to be. The name of your project is invisible to users, they only see the "Bundle display name."

Bogatyr
  • 19,255
  • 7
  • 59
  • 72
  • 1
    i would prefer users refer this answer by Bogatyr so that it will not create issues with 'Provisioning Profile' and 'App ID' in the future if you want the app to be in the appstore – Deepak Thakur Nov 25 '13 at 13:20
  • Changing bundle name in info.plist is recommended by top developers. nice !! – M Swapnil Aug 04 '15 at 13:42
43

Image explains everything

click on you project in project explorer and again click on your project on right side and there you can see project name as shown in the figure

Sabareesh Kkanan
  • 1,201
  • 1
  • 14
  • 22
  • Works like a charm on Xcode 6.1.1. However these two following links can help you before/after changing the project name, only in case you encounter problems: http://stackoverflow.com/questions/10464561/should-bundle-identifiers-be-lowercase-or-camelcase and http://stackoverflow.com/questions/12820022/temp-caseinsensitive-rename-in-bundle-identifier – King-Wizard Feb 08 '15 at 01:32
  • Works on XCode 8 – odemolliens Mar 14 '17 at 15:45
10
  1. On the left side expand Targets
  2. Double click on your target and then select build tab in the newly opened window
  3. on the top right there is a search box. Type - "Product Name"
  4. Now look below, under packaging section, you will see Product Name
  5. Change it and clean rebuild, your new app name should be changed by now.
5

For changing application name only (that will display along with app icon) in xcode 4 or later:

Click on your project file icon from Groups & Files panel, choose Target -> Build Settings -> Packaging -> Product Name. Click on the row, a pop-up will come, type your new app name here.

For changing Project name only (that will display along with project icon) in xcode 4 or later:

Click on your project file icon from Groups & Files panel, choose Project(above targets) from right pane, just see at the far right pane(it will be visible only if you have enabled "Hide or show utilities").Look for project name.Edit it to new name you want to give your project.

Delete your app from simulator/device, clean and run.Changes should reflect.

That's it

maddy
  • 4,001
  • 8
  • 42
  • 65
5

Goto youname-Info.plist

Change Both

Bundle name and Bundle display name to your preferred file name.

Done.

Jason
  • 168
  • 1
  • 12
4

Here is Apple's step by step visual guide to change name of Xcode project.

To change name of workspace just rename it.

NaXir
  • 2,373
  • 2
  • 24
  • 31
  • 2
    New link: [Rename a project or an app](https://help.apple.com/xcode/mac/8.0/#/dev3db3afe4f) – Tom Dec 25 '17 at 09:32
3

ohho's answer is perfect:

For Xcode 4 or later:

Open a project

Select Project Navigator

Highlight project name

Single click on project name

BUT, if you only do this, once you try to debug on a new device, you will find an error:

file not found: /Users/someuser/Library/Developer/Xcode/DerivedData/OLDNAME-akbwbarcniqxytctbebckkelkbxs/Build/Products/Debug-iphonesimulator/OLDNAME.app/OLDNAME

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Then you need to do one more step:

  • Select target on the left panel
  • Choose the oldnameTests in Targets
  • Select the Build Settings Panel
  • Search for "TEST_HOST" and change the old value to the new.

Good Luck and Have Fun

Community
  • 1
  • 1
Desmond
  • 767
  • 1
  • 6
  • 18
2

in xcode 4.4, you have to click on the project at the top of the navigator (left panel). Then click twice on the target in the second column to highlight the target name. Then you can change the product name. You will also need to modify the archive name when you go to create an archive. To do this, you must edit the scheme, click on Release, and then change the archive name.

JeffB6688
  • 3,782
  • 5
  • 38
  • 58
1

I am using xcode 4.3.1 and tried to change product name as Quakeboy said above in the bundle setting, but it led to reading error. I was stuck in this error for an hour and now it is working well. I simply made the product name blank then retype the older name that I had before. building succeeded again!

Note to anyone who like to change project name : you don't have to change the project file name the bundle display name will be display to users so just don't hang out with this issue too much. can be wasting time.

jazzed28
  • 89
  • 2
  • 7
1

It creates an organizational nightmare to have project names that don't match the bundled name. But when I use the "click on project name and answer yes to let xcode rename all of the references" technique, all of the nested folders for the project on my hard drive still have the old project name. Why aren't they renamed to match?

If I change those folder names, I'm pretty sure it will mess up all of the project links. I am not going to take the chance, unless someone can suggest a way around this.

Nikhil
  • 16,194
  • 20
  • 64
  • 81
0

Select the project in the Project Navigator (Command+1) and open the File Inspector in the right sidebar (Command+option+1).

There, change the Project Name.

Buh Buh
  • 7,443
  • 1
  • 34
  • 61
Dipak Narigara
  • 1,796
  • 16
  • 18
0

Xcode 3.2.5: In top menu bar, Project>Rename...

Brent
  • 1,378
  • 2
  • 16
  • 30
0

I tried by changing the Project name in Project Navigator, but you need to follow through with the all the step outlined here!!!. I did not follow the second step and this broke my app, had to rework a older version which took two days, see my SO post here.

Community
  • 1
  • 1
dancingbush
  • 2,131
  • 5
  • 30
  • 66
0

I tried ohho's answer and it didn't work but found another solution. You can open your Info.plist file and go where it says' "Bundle Name" and change to your new name that will be shown in your launcher. I hope this wrks

0

Simple step

1.Select the project target left side on top of all folders and files 2.Single click on the project again it will allow you to change the name 3.type as u want the name of the project and the name of the app 4.Press enter. it will ask to change every where accept it 5.same procedure do on the folder as well all place the name will be changed. i did it today

Ullas Pujary
  • 349
  • 4
  • 14
0

Just in case this helps someone, I have a shell script (xcmv.sh) with the following:

#!/usr/bin/env bash

mv $1 $2
mv $1.xcodeproj $2.xcodeproj
mv $1.xcworkspace $2.xcworkspace

LC_ALL=C find ./ -type f -not -path "./.git*" -exec sed -i '' "s/${1}/${2}/g" {} +

I then drag this file into the project directory and do:

sh xcmv.sh Starter MyProject

This changes the project name, the workspace name, plus any and all references to the old name in the project files, code files, plist, and so on.

As the sample indicates, I often use it to rename one of my various "starter" projects to the desired project name.

Note the git directory (if it exists) is ignored.

Michael Long
  • 1,046
  • 8
  • 15
-2

This video shows a developer renaming an Xcode 6 project. First single-click the project name to change it, then make sure to also set the host application for your test build target.

https://www.youtube.com/watch?v=ZHr1vjkTxC0

Michael Myers
  • 188,989
  • 46
  • 291
  • 292
hihihi
  • 1