Renaming an Xcode project with Pods: the easy way

SHISHIR
PROGRAMMING LITE
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

  1. Select your project inside “Project navigator” on the left of the Xcode view.
  2. 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.
  3. 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

  1. 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’
  2. Click on the OLD name in the scheme, and it will become editable, change the name.
  3. Quit Xcode.

Step 4 — Rename in master folder

  1. Open your project folder and rename OLD.xcworkspace to NEW.xcworkspace.

Step 5 — Handle Podfile

  1. In terminal, cd into project directory & open Podfile. You should see a target clause with the OLD name. Change it to NEW and SAVE.
  2. Execute ‘pod deintegrate’, Cocoapods will delete pod related configs, scripts, generated framework and also Pods/ directory.
  3. Now execute ‘pod install’.

Step 6 — Now open your Project

  1. You will see a warning: “The folder OLD does not exist”, dismiss the warning.
  2. 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.
  3. 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.
  4. Now Clean and build the project.

--

--

SHISHIR
PROGRAMMING LITE

{ 'designation' : 'Lead Software Engineer' , 'hobby' : [ 'Music', 'Photography', 'Travelling' ] ,’email’: ‘shishirthedev@gmail.com’ }