In all of my stupidity I've notice I misspelled my own project. I'm honestly scared to rename it in Mac due to certain filepaths referencing folders that now do not exist. Is there an easy way to rename a project?
Try refactoring, It should work fine, if it doesn't refactoring creates a snapshot instantly.
- In Xcode, go to the navigator panel and select the target:
- Go to the inspector panel (on the far right) and select the File Inspector icon. You can change the project name here. (You will get a pop-up dialogue to confirm the changes.)
so try it out, if it blows up restore, and create a new project, and migrate to the new one slowly (as @troop231) mentioned.
good luck!
source
I've posted this as an answer elsewhere, but this works like it should...
This is a four step change. And is a real pain
Step 0 - Backup your existing project
- Quit Xcode
- Right click the master folder containing the project file and the assets, select archive
- This will create you an archive of the OLD project
- Open the OLD project in Xcode again
Step 1 - Rename the project.
- Click on the project you want to rename in the “project navigator” on the left of the Xcode view.
- On the right select the “file inspector” and the OLD name of your project should be in there under “Identity and Type”, change it to the new name.
- A drop down appears, with a “rename” ok box
- Click rename.
Step 2 - Rename the Scheme
- In the top bar, just by the “Stop” button, is the scheme for your OLD product, click this then “manage schemes”
- Click on the OLD name in the scheme, and it will become editable, change the name. (If you click it twice, you go into the editor (which you don’t want) click the manage schemes button to get back again)
Step 3 - Rename the folder with your assets
- Quit out of Xcode
- In the correctly named master folder, there is your newly named xcodeproj file with the the wrongly named OLD assets folder. Rename the OLD folder to your new name
- Reopen the project and you get a warning “The folder OLD does not exist”, dismiss the warning
- On the left in the “project navigator” click the top level OLD folder name.
- On the right in the “file navigator” under “Identity and type” you will see the “Name” entry, change this from the OLD to the new name
- Just under this is the “location” entry, just below that is a folder symbol with the OLD name. click this and chose the newly renamed folder
Step 4 - Rename the Build plist data
- Click on the project in the “project inspector” on the left, in the centre panel select “Build Settings”
- in this section search for plist
- Under packaging, you will see Info.plist, and Product bundle identifier.
- In Info.plist rename the OLD entry
- In the Product Identifier and rename the OLD entry
FINALLY you are done and can rebuild (Apple-key+shift+k clean, Apple-Key+b then build)