Renaming an Xcode project with Pods: the easy way
Published in
2 min readJan 16, 2019
When we make an app, we might feel like renaming the app name before we publish it. But the process in Xcode is a bit complicated. It becomes more complicated when we have some Podfile in our project. In this article, I am going to share the process to rename the project.
Step 1 — Rename the project
- Select your project inside “Project navigator” on the left of the Xcode view.
- On the right select the “File inspector” and the name of your project should be in there under “Identity and Type”, change it to the new name & press Enter.
- A dialog will display, listing the items in your project that can be renamed. Click “Rename” in a dropdown menu
Step 2- Rename the scheme
- In the top bar (near “Stop” button), there is a scheme for your OLD product, CLICK on it, then go to “Manage schemes”. You may find Manage Schemes also here: Menu bar > Product > Scheme > Manage Schemes’
- Click on the OLD name in the scheme, and it will become editable, change the name.
- Quit Xcode.
Step 4 — Rename in master folder
- Open your project folder and rename OLD.xcworkspace to NEW.xcworkspace.
Step 5 — Handle Podfile
- In terminal, cd into project directory & open Podfile. You should see a target clause with the OLD name. Change it to NEW and SAVE.
- Execute ‘pod deintegrate’, Cocoapods will delete pod related configs, scripts, generated framework and also Pods/ directory.
- Now execute ‘pod install’.
Step 6 — Now open your Project
- You will see a warning: “The folder OLD does not exist”, dismiss the warning.
- In the “Project navigator” on the left, you will see a OLD folder name in red. Click on folder icon in identity and type to open finder and navigate to the NewName folder from NewName project folder.
- Go to Project Navigator -> [Your project name] -> Build Settings -> Packaging -> Info.plist File, and change the path’s substring from “OLD” to “NEW”. Do the same for Product Identifier.
- Now Clean and build the project.