简体   繁体   English

我是否需要卸载Xcode 4才能安装Xcode 5?

[英]Do I need to uninstall Xcode 4 to install Xcode 5?

I have Xcode 4.6.3 installed on OS X 10.8.5. 我在OS X 10.8.5上安装了Xcode 4.6.3。 What is the correct way to install Xcode 5? 安装Xcode 5的正确方法是什么? Is it necessary to uninstall 4 first or simply overwrite it? 是首先卸载4还是简单地覆盖它?

Naturally, I wish to preserve my current settings. 当然,我希望保留我目前的设置。

I renamed Xcode 4.6.3 to Xcode4.app then installed Xcode 5 as the default Xcode.app, Keeping both versions available. 我将Xcode 4.6.3重命名为Xcode4.app,然后将Xcode 5安装为默认的Xcode.app,保持两个版本可用。 It good practice to verify which Xcode is your default using Xcode-select. 最好使用Xcode-select验证哪个Xcode是您的默认值。

gdunham: ~$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

example:
    # switch to Xcode 4.6.3
    xcode-select --switch /Applications/Xcode4.app/Contents/Developer

As the others have stated Xcode is a complete self contained package. 正如其他人所说,Xcode是一个完整的自包含。 The SDK's and new tools are contained inside the package contents. SDK和新工具包含在包内容中。 Because of this you don't need to install the command line tools just to use git, etc. You can set up aliases and use xcrun to access the command line tool inside the Xcode package 因此,您不需要安装命令行工具只是为了使用git等。您可以设置别名并使用xcrun访问Xcode包中的命令行工具

gdunham: ~$ alias git='xcrun git'
gdunham: ~$ git --version
git version 1.8.3.4 (Apple Git-47)

You personal settings are stored in your user account ~/Library/Application Support/Xcode so they should not change. 您的个人设置存储在您的用户帐户~/Library/Application Support/Xcode因此不应更改。

Xcode documentations sets are stored here ~/Library/Developer/Shared/Documentation/DocSets and shared. Xcode文档集存储在这里~/Library/Developer/Shared/Documentation/DocSets并共享。

您可以在不覆盖Xcode 4的情况下安装Xcode 5.每个Xcode副本都是/ Applications文件夹中的唯一路径。

On my machine, I've put my copy of Xcode 4 into a folder I've named "Xcode4". 在我的机器上,我将Xcode 4的副本放入一个名为“Xcode4”的文件夹中。

Then Xcode5 (which is named Xcode.app, just as Xcode4 is) goes where the last version of Xcode went. 然后Xcode5(名为Xcode.app,就像Xcode4一样)去了Xcode的最后版本。

The SDK's and everything else are embedded within each Xcode application package. SDK和其他所有内容都嵌入在每个Xcode应用程序包中。

There is nothing as such any problem in keeping Xcode 4 and Xcode 5. Each of these Xcode has unique path in .../Applications directory . 保持Xcode 4和Xcode 5没有任何问题。这些Xcode中的每一个在... / Applications目录中都有唯一的路径

I'm using both Xcode 4 and 5. There haven't any problem in using these. 我正在使用Xcode 4和5.使用它们没有任何问题。 Only you can use one Simulator at a time . 只有您一次可以使用一个模拟器

Also, the problem that may arise is applications build using Xcode 5 might not open in Xcode 4. Since the changes done in XIB file in Xcode 5 doesn't recognized in Xcode 4. Check-out this link for the same XIB could be read issue 此外,可能出现的问题是使用Xcode 5构建的应用程序可能无法在Xcode 4中打开。由于Xcode 5中的XIB文件中所做的更改在Xcode 4中无法识别。 可以读取此链接以查找相同的XIB问题

Hope this might help! 希望这可能有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM