How to change workspace name in Xcode?

2019:

First note that this question is about changing the name of an Xcode workspace. The QA is not about changing the name of a project, a project within a workspace, the source folder, or other aspects of naming in the Xcode milieu.

Xcode 11 and further.

Surprisingly, you can now just change the name of the file ! As strange as that seems.

  1. Quit Xcode. You must do this first.

  2. Using your mouse, and keyboard, change the name:

enter image description here

enter image description here

This causes no problem with Swift Package Manager or any other issue.

You now simply open the .xcworkspace file as normal.

One part of a fifteen year old Apple problem resolved!


Yeah I reckon so. As far as I can see, a workspace is just a reference to one or more Xcode projects and doesn't produce anything outside of those projects.


Steps to Rename Workspace

  1. Rename the Folder( contain all files) of Main Project
  2. Rename the Workspace
  3. delete the Xcode project from Workspace and re-add/Drag Xcode project again to Workspace. And in build setting rename “product name”
  4. Now, In Workspace ,select the project in general , option for selecting infoPlist will appear, select the info plist of project. then, Click the Manage Scheme and Create New Scheme with Xcode Project Name , check the New Created Scheme and delete the older one.
  5. clear the both Xcode and Workspace ..and delete Derived Data “~/Library/Developer/Xcode”
  6. if project contain Bridging Header file then , just rename the Bridging Header file with With project name - “ProjectName-Bridging-Header.h” and then open the Xcode project not workspace. In build settings.. in “Swift Compiler -Code Generation”—> Objective-C Bridging Header — “reset the Path of Bridging header file”. close the Xocde. And if Project Contain Pod File , then open Pod file rename the target name with new project .close both xocde project and Workspace project and install the pod.
  7. now open the Workspace clean and build.

Tags:

Ios

Xcode