Rename Xcode project completely with Pods and Bridging header

Renaming a project in Xcode can be a trouble if you don’t know what you are doing. In this tutorial you will learn about steps and checks necessary for changing project name. This guide is divided into 2 section

  1. Renaming a basic Xcode project
  2. Renaming a Xcode project with Pods and Bridging Header

Renaming a basic Xcode project

For the purpose of  this guide we have created a project named OldName Basic renaming will involve following steps

Open the project in Xcode and select the project name in project navigator-> select project target->Change The name in Identity and type . Following images will show you

amarendrasingh.com

amarendrasingh.com

As you can see in the image above we have changed the name to NewName in identity and type

After this you will be prompted to confirm rename.

amarendrasingh.com
click on rename

Click on rename button then click Ok. You will see project file target and others getting renamed to NewName Your project will look some thing like this

amarendrasingh.com
xcodeproj, project name and target name are all new name

as you can see in the image above xcodeproj file is renamed along with project name and target name. So far so good now close the xcode and move to project folder in finder. We will now rename the project folder and other OldName folder inside it to NewName

Rename project folder and folder inside it to NewName

Now open your project in xcode. Don’t worry if you see a OldName folder in red.Click on folder icon in identity and type to open finder and navigate to the NewName folder from NewName project folder

choose marked folder

Once you choose marked folder you will have NewName folder instead of OldName folder.The last and most important step which will complete your project renaming is changing path of info.plist

For that you need to go to target ->build settings ->Packaging and change path to NewName/info.plist  

After you have changed the path of info plist your project will look some thing like this

Project-target->build settings ->packaging -> info.plist file path

Congratulations you have successfully completed the renaming of a Xcode 9 project. However you still need to perform few more steps if your project has Pods and bridging header. Read along if you need to rename project with pods and bridging headers

A pat on the back !!