Changing the name of my app? - xcode

How do I change the name of my app within Xcode 6, so that it will change the name of all of my files properly?

select your target under "Targets" in the project editor, then choose View > Utilities > Show File Inspector. Xcode opens the File inspector, which includes the Identity and Type pane. Enter your application's new name in the Project Name field then hit the return key on your keyboard.
Xcode displays a project-rename dialog that contains all the items that can be renamed in your project. Leave your application selected in the dialog and deselect all other items then click Rename to perform the rename operation.
Hope this helps

Related

Standard way to rename xcode project

After I create a project name for example Proj11, I'd like to change the name to Proj12.
So I use Project->Rename, then the name of the project to Proj12
But the project still contains several folders name Prlj11, and after I change the folders' name, the project can't been loaded.
So what is the standard way to rename my project as well as folder name.
Click on the project folder (blue folder with your app name on the top of the project navigator). Pull up the utilities (right pane), then file inspector. Your project name is there, change it to whatever you want. Then it will ask to save, keep all the files it selected for you selected, then press rename
The best answer I found was on the apple developer site. Imagine that? You can follow the link below, but essentially it is:
1) 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.
2)a window will appear confirming the change and what it will change. Once you confirm it will make the changes.
https://developer.apple.com/library/ios/qa/qa1625/_index.html
OR ANOTHER WAY AND EVEN EASIER:
left-click on the name project and rename. As soon as you rename it will ask you if you want to rename:
The folders you see in XCode navigators are not an actual folder/directories, these are virtual folders only to group your files.
And the folders you see in Finder, the path you manually set for the project, you need to rename them manually.

Xcode 4 file complete path

If I have any file open in Xcode and I would like to know the complete path to the file, how do I do that in Xcode 4? In Xcode 3 I could hover over the file name and get a tooltip with the complete path. I could also right-click a file name at the very top and get a pop-up window with the complete path. This is all gone in Xcode 4.
The annoyance is that when using the Xcode 4 search, it doesn't even show the complete path of the file in the results?!
The only solution I have currently found is to open the save as dialog and get the path from there! That definitely can't be the solution. What am I missing?
For files that are not part of the project you can use the File menu's Show in Finder option.
Update: Xcode 4.2 restored the ability to right-click or command-click on the file's name in the title bar to get a drop-down with the full path.
Show the file inspector utility (normally at the right hand side of the main window on my setup , to do that click the rightmost button of the "View" buttons menu). Click on your file in the navigator and the inspector will refresh with the information. Full path is disclosed and there is a button to open a new Finder window with the enclosing folder.

Xcode 4 : how to have the folder name of each opened project displayed in the Window menu?

In Xcode 3.x, it was very practical, when you have several Xcode project opened in parallel, to know what is the folder of each project. This info was given in the list of the opened project in the "Window" menu.
It was very useful as it allows to find easily a defined version of a project when you work on several versions in parallel.
How to have the name of the project folders associated to each project displayed in the "Window" menu ?
Is there an option somewhere ?
Thanks a lot.
You could Command-click the file icon next to the title in the window's title bar. This shows the path to the file (in this case the project or workspace file) in any Cocoa app. You can even click one of the entries in the popup menu to open that folder in Finder.

How to view a file's property in Xcode 4 (used to be command-I)

In Xcode 3, I used to select a file, and press command-I to view the file's property. I frequently have files missing, and hence this will show me the path to the file to fix.
In Xcode 4, command-I no longer works. What can I do?
The new shortcut is Option-Command-1 to show the file inspector.
If the file is missing, you can click on the icon at Location section to re-reference the file.
The only way I could get to it now is select the file, right click, "Open in Finder", then command-I.
The other option is try to see if "File Inspector" in the Utilities sidebar would give you enough information.

How to tell Xcode where my info.plist and .pch files are

I renamed my project and it's files and now Xcode is still looking for the old info.plist file. Where do I set the locations of the .plist and .pch files that it needs.
In my Project Info window, under Packaging there's an item for Info.Plist file, but it was blank, and when I try different paths, nothing happens. On compile it still says it can't find the plist by the old name.
I know this answer is answered and closed, but I'm going to add my discoveries here as it is slightly different for Xcode 4.2:
Select your project
In the left side of the middle pane, select your app under "Targets"
Select the tab "Build Settings"
Search the following keywords: "info.plist" and "pch"
At this point it should be pretty clear which are the ones you need to modify.
Click on "Validate Settings" and you're done.
Found it.
It was in the settings for the Target.
Choose Target in the Groups and Files pane on the left.
Right-Click and choose Get Info
Search for "Info.Plist" and type in the filename for the correct plist file into the property of the item named "Info.Plist File".
Then search for "Prefix" and find the item named "Prefix Header".
Change it's property to the name of the correct .pch file that you are using.
I think these different "Info" windows are confusing. You have to make sure the right file is selected in the Groups and Files pane before selecting "Get Info", and it's hard to tell if what you're doing is actually making changes to the Info.plist file, or where your changes are being saved.
For Xcode 10.1 when rename or move info.plist to sub folder.
Select your project
Choose targets
In General tab under Indentity you can specify new info.plist file
One more wrinkle to this. It still would not find the new plist file because it was in a folder inside the main project hierarchy on my disk. In this case, the name you should put in the build settings is relative to the project file, like "FolderName/Info.plist" for example.
Just close project and reopen it. Then you will see on the project target, choose plist button on the General tab See this screenshot to make sense
From XCode 11 onwards, the updated path for Info.plist has to be changed under Target -> Build Settings -> Packaging -> Info.plist File.
Please read here for further details
I know this is an old post, but I just ran into this same problem using Xcode 8.2. I had already duplicated .plist and .storyboard files in finder, but my Xcode project did not pick them up. In order to add files to your xcodeproj just right click on the project or folder in the Project Navigator and select Add Files to "Your Project Name". You should be able to select the files you need (use Cmd key to select multiple individual files).
If you created a new .plist or .storyboard file you'll need to link to your target membership. To link just click on the file in the navigator and on the right hand side in your standard editor > file inspector > target membership select the appropriate target membership.
The correct way to do this without duplicating files in finder is by selecting the file to duplicate and then going to File > Duplicate on the Xcode navigation menu.
I am working with Xcode 9.3 and "boldly" changed my app name without understanding that I was inviting trouble: I got it.
Fortunately, it is now easy to rename a project or app with reliable results if in Xcode you select the blue icon on the left/in the project navigator and then edit the "Identity and Type" "Name" field in the "File Inspector". This brings up a dialog, and clicking on "Rename" works reliably.
Xcode 14
Chose your Targets -> Build Settings -> Packaging
Find key "info.plist File" and update path like "AppName/FolderName/Info.plist"
enter image description here

Resources