AppName doesn't change, after renaming in xcode - iphone

I have two apps which are 90% same.So I have used the same code and renamed it in xcode.After that I have installed it in my device.So it is giving the previous appname not the new name.So Kindly tell me.Let me know if you need any more details.

If you are refering to the label inside the app icon in the springboard (the iPhone "desktop") , you will need to open the YourApp-Info.plist (located, usually, in Supporting Files) and change the value for Bundle display name (or CFBundleDisplayName).

go to your Xcode project, select the desired target, click on "Build settings" and look for "Product Name", now enter the new desired name.

To change the name of the app on the iOS home screen, you need to change the CFBundleDisplayName key in your app's Info.plist file.
https://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-110725-TPXREF135

As everyone say, the bundle display name is the name displayed on your device.
You might want to change the bundle identifier too, but it's for corresponding to your provisionning profiles and to be posted on another identifier on the app store.
You might want to rename your Xcode project, I found yesterday a way to do this easily: click on your project name (on left panel), go on the right panel (open it if not) and change the "project name" textfield. it will ask you to rename lot of files automatically.
Finally, have you considered to create a new target, instead of creating a new project ? If the differences are just images and nib file, you can duplicate an app easily, this way.

Related

How to change the bundle identifier of an app in Xcode 5?

Xcode 5 won't let me change the bundle identifier. The app name portion after com.mycompany. is greyed out.
I created a bundle identifier in ITC which slightly differs and I want to use this new bundle identifier.
Do I have to create a new Xcode project with the correct identifier?
Actually this is pretty simple:
Select your target
Select 'info' tab (you can do the same by finding the plist file on the project)
Search for "Bundle Identifier" key, The value on your end should be com.mycompany.${PRODUCT_NAME:rfc1034identifier}.
If you want to change the grey field just replace the "com.mycompany" with whatever you want. the other field is the "Product Name" (which is read dynamically from the relevant key), You can change it by set the "Product Name" key on "Build Settings". You can also do it pretty ugly and change all the bundle identifier to whatever you want but I don't recommend that because if you would add more targets it would be static and harder to maintain.
Select your target under the Targets section.
Go to the Build Settings tab.
Scroll down to Packaging.
Change the Product Name to the desired one.
In Xcode 5.1.1, you can do it by simply renaming your Target. Double-click on the Target name to change it.
In your projects Info.plist(or in Info tab of project setiings, which is the same) change ${PRODUCT_NAME:rfc1034identifier} to desired name. After that it wouldn't be greyed out.
I had to do this for my project too and found it easily done in Xcode 5.1.1 by just renaming the project name in the Navigator and allow Xcode to find all the strings you need to change automatically. Just make sure you check-in or create a snapshot of your project first.
Your bundle identifier is based on PRODUCT_NAME.
By default, PRODUCT_NAME is based on TARGET_NAME, which is quite difficult to change (XCode6 at time of writing). So don't be afraid to impose a different name here if necessary.

Change name of iPhone app in Xcode 4

I want to change the name which is displayed below the app icon on the iPhone screen.
I use Xcode 4 and I have one target with keys:
Bundle display name : ${PRODUCT_NAME}
Bundle name : ${PRODUCT_NAME}
What I want, my project name is for example "test" but I want to have "MySuperApp".
So, where can I change it best? Is there a place where I can change ${PRODUCT_NAME}?
Are there any other places where I have to change it?
Answer without file rename
Note that an answer that does not require file rename is below.
Answer with file rename
OK, here is what I found, took me a bit of hunting after reading this post, so hopefully this answer will help everyone:
1.In the project contents pane at left, click the Folder icon.
2.Select the top-level blue line representing the project.
3.If you don't have the Inspector pane (right pane) open, click the button to enable it. This is the third button in the "View" toolbar towards the upper right corner.
4.In the Inspector pane, click the little folded-corner paper (file properties) icon.
5.First thing is Project Name. Type in a new one, you will be prompted to rename project content files.
I should add, this will leave your old app with the original name in the simulator, so you still need to delete it from the simulator. Also any files you created in the old app bundle will not be brought forward to the new bundle (unless you find them in Finder and move them over).
(EDIT:) One more important note. Renaming your bundle will mean that the App Bundle Identifier you registered with Apple Provisioning Portal will no longer work for that app. You will need to generate a new App ID and Provisioning Profile in order to distribute your app to a physical device.
In Xcode 4, select your target, "Info" tab, and set the "Bundle display name" field to the name you want (i.e. "MySuperApp"). This is the simplest, pain-free solution.
All other answers described here do not address the original posted issue: "I want to change the name which is displayed below the app icon on the iPhone screen." The upvoted answers of: Woody, Jay, and youshunei are OK but they will all change the displayed name AND either:
A) change your App Bundle Identifier and cause an incompatibility between your app and the Bundle Identifier you registered with the Apple Provisioning Portal (which is a problem if you have already distributed your app or intend to submit the app)
OR
B) result in scheme issues that others have mentioned (i.e. needing to delete/re-create existing schemes)
Change it in the build tab of the targets settings page
As clarification: select targets, select the target you are building, get info, select the build tab, write 'product name' in the search box, and change it there.
On Xcode 4, you click on TARGETS name 2 times (not doubclick), change name and restart Xcode. It's worked for me, that's simple.
You want to change the Bundle Display Name in your project.plist.
Bundle display name : ${PRODUCT_NAME}
should be changed to
Bundle display name : MySuperApp
This changes the label of the icon in iOS without actually changing the app identifiers.
If you just change the bundle display name, you won't need to set up a new app id and provisioning profiles.
Making the product name change:
Double click the name right under "Targets" and modify the target name to whatever you want.
Checking if the change has been made:
Click on "Target" and on the right hand side search for "Product Name" under "Build Settings". The displayed value of the product name should reflect your change. If not, double click on that name to make sure it's being set to $(TARGET_NAME).
Select Project
Select Target and single click to edit and rename and you're done
You can see the product name gets changed
Here the snap for these 3 steps
Edited:
I've noticed the similar answer with image attachment by youshunei after my post. So, I would add a bit more information here that I've tested it on Xcode 6.3.2 and it doesn't need any restart.
Edited:
When I renamed one of my Mac OS X app which contains comma in its name the same way. I got missing file (name trimmed up-to comma) in some pod linking library. So, I have to rename my app at Target -> Build Settings -> Product Name
To change the name of the app if it has been customized:
Project info -> Targets (click on app icon entry) -> Build Settings -> Product Name
In recent versions of XCode (I am on 4.3.2 currently), $(PRODUCT_NAME) is set to $(TARGET_NAME) which defaults to the name of the project directory (no don't change the directory name).
Solution: Click on the file navigator. Click on your blue project icon. Look for the TARGETS list (under the PROJECT list). Hover-click your target; then rename it to your product name.
Aside: If you are having code-signing problems, I found that deleting, revoking, and regenerating all certificates/keys, and profiles fixed my problem. I tried everything else first!
One thing that seemed to help when I went through this is in Xcode 4 is that it appeared to be necessary to delete all the schemes. Prior to this it seemed that although the app would be compiled under its new name, it'd be as the old name in the simulator. However, I did do other desperate measures like re-start xcode and delete the app out of the simulator folder so it's hard to be certain that deleting the schemes was the key.
The issue I was having was that I have multiple Info.plist files in my Xcode project. In order to ensure I had the right one which contains the Product Name, I moved the existing Info.plist temporarily to force Xcode to allow me to choose another one. Since Info.plist is not part of a target, but part of the Project configuration, this was the only way I could find to do this.

How to change Xcode Project name

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 ..
For Xcode 4 or later:
Open a project
Select Project Navigator
Highlight project name
Single click on project name
For Xcode 3:
Open a project > Menu > Project > Rename ...
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."
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
On the left side expand Targets
Double click on your target and then select build tab in the newly opened window
on the top right there is a search box. Type - "Product Name"
Now look below, under packaging section, you will see Product Name
Change it and clean rebuild, your new app name should be changed by now.
Goto
youname-Info.plist
Change Both
Bundle name and Bundle display name to your preferred file name.
Done.
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
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
Here is Apple's step by step visual guide to change name of Xcode project.
To change name of workspace just rename it.
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.
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.
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.
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.
Xcode 3.2.5:
In top menu bar, Project>Rename...
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.
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
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
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.
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

How can I change the name of my iOS project?

How can I change a name of my project in the Xcode?
Newer Versions of Xcode
According to the Xcode documentation says that you can select your project in the lefthand panel and then open the properties inspector. By editing the project name, you'll be prompted to renamed targets etc.
Original Answer
I'm not sure exactly what you are asking, so I've given two parts to my answer.
To change the display name of your project, (under the icon on the home screen) you should edit your Info.plist file in the Resources group of your project. Change the Bundle Display Name key. Make sure that you save the plist file and that you've deleted the old app from the simulator. Then, clean your build and then you can build it again to the simulator.
To change the name of your project, target and executable, click on Project -> Rename... in Xcode.
It's simple. Just press enter on name of project. Rename your project as desired. This will prompt changes to be done in entire Project. Click on Rename.
Ap iOS app under construction has at least 6 "names". They can all be different and can be set in different places.
Project name.
Target name.
Product name (which will become the .app bundle file name, should have no spaces).
Bundle display name (in the info.plist, displayed under the icon, spaces allowed).
Bundle ID suffix.
App name you give iTunes Connect.
Depending on what you change, you may need to delete the app from your device/simulator, and reinstall/build-and-run, to quickly see the changes.
Ah, I figured it out already. You need to change the active target.
If you want to change Project Name, Target name, -Info.plist name & -Prefix.pch name then,
- Select Project in Xcode (.xcodeproj file)
- Selecte file inspector
- In identity section change project name which u want to update & press enter
- After scanning whole project it will ask to change the file names i.e target, plist & pch file
- Select check boxes as per your need
In Xcode try the Project | Rename menu command.
See here.
1) Expand the "Resources" folder
2) Click on the "yourappname-info.plist"
3) Expand the "Information Property List"
4) You can change the "Bundle Display Name" to anything you want to display on the iPhone Home Screen.
if only change display name under app icon in device main screen you just need change "Bundle display name" key of target at tab info.
#Mosche This question should be updated for XCode 4.
Seems one has to use sed in .xcodeproj directory:
find . -type f -exec sed -i -e 's/OldProjectName/NewProjectName/g' {} \;

Debug/Distribution discrepancy in Xcode

I have searched and figured out how to change the name of my app (going through and changing the Product_Name) that shows up below the icon so now my app doesn't use the arbitrary name that I picked out when I started developing.
Now that I am using a distribution certificate - it goes back to the old one. I changed the name of the .app file under the Products menu and it shows up just fine during the "debug" time of Xcode. As soon as I change the Overview slider to "distribution" it reverts back to the old .app name and for the life of me I can't change it. What gives?
Search for "Product Name" in the Project Settings screen. I'll venture a guess that there are two different settings there, one for the "Debug" and another for the "Distribution" configurations.
Alternatively, you can also directly edit the "Bundle Display Name" in the (YourAppName)-Info.plist file.
There is "bundle display name" in the info.plist that can change the name under the icon on the device.