[英]How to change workspace name in Xcode?
Is there any appropriate way to change workspace name in Xcode?有什么合适的方法可以在 Xcode 中更改工作区名称吗?
Seems to me that it works to quit Xcode and manually change the .xcworkspace
file from OLD_NAME.xcworkspace
to NEW_NAME.xcworkspace
.在我看来,它可以退出 Xcode 并手动将.xcworkspace
文件从OLD_NAME.xcworkspace
更改为NEW_NAME.xcworkspace
。
Xcode 5 was used at the time of writing.在撰写本文时使用的是 Xcode 5。
First note that this question is about changing the name of an Xcode workspace .首先请注意,这个问题是关于更改 Xcode工作区的名称。 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. QA 与更改项目名称、工作区中的项目、源文件夹或 Xcode 环境中命名的其他方面无关。
Xcode 11 and further. Xcode 11 及更高版本。
Surprisingly, you can now just change the name of the file !令人惊讶的是,您现在可以更改文件名! As strange as that seems.看起来很奇怪。
Quit Xcode.退出 Xcode。 You must do this first.你必须先这样做。
Using your mouse, and keyboard, change the name:使用鼠标和键盘更改名称:
This causes no problem with Swift Package Manager or any other issue.这不会导致 Swift Package Manager 或任何其他问题。
You now simply open the .xcworkspace file as normal.您现在只需像往常一样打开 .xcworkspace 文件。
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.据我所知,工作区只是对一个或多个 Xcode 项目的引用,不会在这些项目之外生成任何内容。
I tried the same (XC6) but got a build error with one file not found.我尝试了相同的 (XC6),但出现构建错误,找不到一个文件。 Not a huge issue, but for some it might not be worth the effort.不是一个大问题,但对某些人来说可能不值得付出努力。
In my case I had to rename also the project inside the workspace which had the same name.在我的情况下,我还必须重命名工作区中具有相同名称的项目。
For that it was important before renaming the project to..为此,在将项目重命名为..
.xcworkspace
-file from the Finder从 Finder 重命名.xcworkspace
文件I want to change the workspace name, project name and all linked file with old project name, so I tried the steps from this post, and it's really helpful我想用旧的项目名称更改工作区名称、项目名称和所有链接文件,所以我尝试了这篇文章中的步骤,这真的很有帮助
Renaming an Xcode project with Pods: the easy way https://medium.com/programming-lite/renaming-an-xcode-9-project-with-pods-the-easy-way-5d1228ef25a使用 Pods 重命名 Xcode 项目:简单的方法https://medium.com/programming-lite/renaming-an-xcode-9-project-with-pods-the-easy-way-5d1228ef25a
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.