简体   繁体   English

升级到Snow Leopard / XCode 3.2可能存在问题?

[英]Possible issues with upgrading to Snow Leopard / XCode 3.2?

I'm one of a pair of programmers working together on iPhone / iPod applications. 我是在iPhone / iPod应用程序上一起工作的一对程序员之一。 I'd like to upgrade to the new version of XCode (3.2) and Snow Leopard, but chances are my partner won't. 我想升级到新版本的XCode(3.2)和Snow Leopard,但是有可能我的伴侣不会。 Can anyone highlight any problems we might have sharing code? 谁能强调我们共享代码可能遇到的任何问题? Are there incompatibilities between the old and new, or should we be able to share code / projects happily? 新旧之间是否存在不兼容性,还是我们应该能够愉快地共享代码/项目?

Any help / warnings would be appreciated. 任何帮助/警告将不胜感激。

如果您确实决定尝试至少对OS / Xcode环境进行双重设置,则应将共享的Xcode项目的项目设置设置为“常规”选项卡,将项目格式设置为“ 3.1”,因为如果将项目升级到3.2,则打开Xcode可能会遇到问题它。

Don't do it. 不要这样 The Xcode project files are notoriously fragile, and aren't always compatible between versions. Xcode项目文件非常脆弱,并且在各个版本之间并不总是兼容的。 When they make known-incompatible changes between versions, you'll get a warning opening the files on the new version. 当他们在版本之间进行已知不兼容的更改时,您会收到警告,警告您在新版本上打开文件。 There's no such warning for 3.2 vs 3.1, but that doesn't guarantee that you won't have any problems. 对于3.2和3.1并没有这样的警告,但这不能保证您不会有任何问题。


I should probably clarify that I don't mean that you should never upgrade, just that you and your partner should upgrade at the same time. 我可能应该澄清一下,我并不是说您永远都不要升级,而应该是您和您的伙伴应该同时升级。

I've got two machines in this situation, one of which is SL/3.2 and one Leopard/3.1. 在这种情况下,我有两台机器,其中一台是SL / 3.2,一台是Leopard / 3.1。 For the one project that I share between the two, it seems to work. 对于我在两者之间共享的一个项目,它似乎奏效。 But as Mark points out, there's no guarantee that it will work in all cases. 但是正如Mark所指出的,并不能保证它在所有情况下都能正常工作。

I have not tried this, but it may work to have you use the project file in 3.2 and your partner use a 3.1 project file. 我没有尝试过,但是让您使用3.2中的项目文件而您的伙伴使用3.1项目文件可能会起作用。 Don't check it in, only work with the source files from source control, keep your project files local. 不要检入它,只能使用源代码管理中的源文件,将项目文件保留在本地。 I've done this between versions of Visual Studio, which is what prompted the idea, but though it sounds good in my head I've no idea how well it would work in practice. 我已经在Visual Studio的各个版本之间完成了此操作,这促使了这个想法,但是尽管在我看来听起来不错,但我不知道它在实践中的效果如何。

Another alternative is to keep two versions of Xcode on your machine (search SO or iphonedevsdk.com for the how-to). 另一种选择是在您的计算机上保留两个版本的Xcode(有关方法,请搜索SO或iphonedevsdk.com)。 I've done that through the OS 3.0 betas, but that assumes Xcode 3.1 lives happily on a SL machine. 我已经通过OS 3.0 beta做到了这一点,但是假设Xcode 3.1可以在SL机器上快乐地生活。 Probably the safest one to try, as the worst would be that 3.1 won't install or run on SL. 可能最安全的方法是尝试,因为最糟糕的情况是3.1无法在SL上安装或运行。

Your partner should update. 您的伴侣应该更新。 It's only $29! 才29美元! There are a lot of useful new features, and the time is about an hour total (a bit longer if you include backup, but you are both already doing regular backups anyway, RIGHT?). 有许多有用的新功能,整个过程大约需要一个小时(如果包括备份,则时间会更长一些,但是无论如何,您都已经进行了常规备份,对吗?)。

I was on a mixed team with 3.2 and 3.1 for a while, and it did work - but that was one or two XCode updates ago. 我曾在3.2和3.1的混合团队中工作了一段时间,它确实起作用了-但是那是一两个XCode更新。

You could optionally both keep different project files and each add new files as the other added them, to be really safe... 为了安全起见,您可以选择保留两个不同的项目文件,并分别添加新文件和其他文件。

I agree you should upgrade, but beware, you may need to tweak your code. 我同意您应该升级,但是请注意,您可能需要调整代码。

I particularly noted a difference in the way NSAlert works. 我特别注意到NSAlert的工作方式有所不同。 In 10.5 I passed a variable "window" as a parameter and that created a sheet that opened on that particular window. 在10.5中,我传递了一个变量“ window”作为参数,并创建了一个在该特定窗口上打开的工作表。 In 10.6 the exact same code generated a modal dialog. 在10.6中,完全相同的代码生成了一个模态对话框。 I then changed "window" to "[self window]" and the sheet was back. 然后,我将“窗口”更改为“ [自身窗口]”,然后表格又回来了。

I also have a small problem with Core Data, where it throws the warning "Failed to call designated initializer on NSManagedObject class XXX" even though this code was fully tested under 10.5. 我对Core Data也有一个小问题,即使此代码在10.5下经过了全面测试,它也会引发警告“无法在NSManagedObject类XXX上调用指定的初始化方法”。

I believe there were other smaller problems but I fixed them along with real bugs and didn't make note of them. 我相信还有其他较小的问题,但我将它们与实际的错误一起修复了,没有记下它们。

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

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