Xcode 4.6 和 Xcode 5 安装在一起

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19180347/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:00:43  来源:igfitidea点击:

Xcode 4.6 and Xcode 5 installed together

iosxcode

提问by Nitya

Can we install Xcode 4.6 and xcode 5 on same machine without upgrading from xcode 4.6 to xcode 5?

我们可以在不从 xcode 4.6 升级到 xcode 5 的情况下在同一台机器上安装 Xcode 4.6 和 xcode 5 吗?

采纳答案by Renish Dadhaniya

Yes, you can install multiple versions of Xcode. They will install into separate directories. I've found that the best practice is to install the version that came with your Mac first, and then install downloaded versions, but it probably doesn't make a big difference. See this Apple Developer Connection page for lots of details.

是的,您可以安装多个版本的 Xcode。它们将安装到单独的目录中。我发现最佳做法是先安装 Mac 随附的版本,然后安装下载的版本,但这可能没有太大区别。有关详细信息,请参阅此 Apple Developer Connection 页面。

It's easy to have multiple XCode installs.

安装多个 XCode 很容易。

In the installer there's a pulldown for the location... you just need to pick a new location when you're installing the beta version.

在安装程序中,有一个位置下拉菜单……您只需要在安装测试版时选择一个新位置即可。

These instructions from an Apple dev tools evangelist have the full details (Apple dev username/password required): https://devforums.apple.com/message/40847#40847

来自 Apple 开发工具布道者的这些说明具有完整的详细信息(需要 Apple 开发用户名/密码):https: //devforums.apple.com/message/40847#40847

Then grab yourself a custom icon for the Beta version of XCode you're using, so you can tell them apart in the dock: http://iphonedevelopment.blogspot.com/2009/03/multiple-developer-tool-installs.html

然后为您正在使用的 XCode 测试版获取自定义图标,以便您可以在 Dock 中区分它们:http: //iphonedevelopment.blogspot.com/2009/03/multiple-developer-tool-installs.html

回答by John Muchow

I prefer to create separate folders for different versions of Xcode, which I find provides a little more organization than renaming each Xcode release.

我更喜欢为不同版本的 Xcode 创建单独的文件夹,我发现这比重命名每个 Xcode 版本提供了更多的组织。

My folder layout looks as follows:

我的文件夹布局如下:

/Applications/Xcode.app
/Applications/Xcode4.6/Xcode.app
/Applications/Xcode5.0/Xcode.app

Simply create the necessary folders and drag/drop the relevant Xcode version into the same. You can also download older versions of Xcode from http://developer.apple.com/downloads/and follow the same idea.

只需创建必要的文件夹并将相关的 Xcode 版本拖放到相同的文件夹中。您还可以从http://developer.apple.com/downloads/下载旧版本的 Xcode并遵循相同的想法。

With the folder structure approach, from within a script (e.g. bash shell) you can move between versions of XCode with the xcode-select command line utility by simply specifying the desired folder:

使用文件夹结构方法,从脚本(例如 bash shell)中,您可以使用 xcode-select 命令行实用程序通过简单地指定所需文件夹在 XCode 版本之间移动:

$sudo xcode-select --switch /Applications/Xcode4.6/Xcode.app

Change the release number in the command line to switch to a different version.

在命令行中更改版本号以切换到不同的版本。

回答by Manuel M.

Yes, just be sure of having two different names for them!

是的,请确保为它们使用两个不同的名称!

回答by Jordan Montel

Yes you can because both can be installed and run simultaneously.

是的,您可以,因为两者都可以同时安装和运行。

Create a folder with XCode 4 for example and keep XCode 5 in Application Folder.

例如,使用 XCode 4 创建一个文件夹,并将 XCode 5 保留在应用程序文件夹中。

But, with XCode 5 you can use the property of XCode 4 using iOS 6 sdk. Have a look here.

但是,使用 XCode 5,您可以使用 iOS 6 sdk 使用 XCode 4 的属性。看看这里