Xcode源编译订单问题

时间:2015-07-12 22:21:08

标签: xcode

我正在研究Xbox HID项目的一个分支(允许更好地配置控制器),并遇到了一个非常奇怪的问题。

该项目是三个项目,我在一个工作区下组合在一起,效果很好,它按顺序编译它们(kext,daemon和prefpane)以及所有工作。

然而,我决定解开代码(感谢Alcatraz!)并标准化源文件的名称和位置。这要求我在文件路径发生变化时更新项目。

一旦完成全部,PrefPane将无法加载。出于某种原因,它实例化并将initWithBundle发送到XIB中不是File's Owner的对象。

经过大量的调试和拔毛后,我发现它实例化的对象也恰好是Compile Sources构建阶段中列出的第一个文件。一旦我将正确的文件移动到该列表的顶部,PrefPane再次启动并按预期工作。

这似乎是错的,为什么它需要首先编译这个特定的类...更好的是,为什么它只拾取第一个编译类而不是XIB中指定的类?

我在OSX 10.9.5下使用Xcode版本6.2(6C131e),但是,我使用的是OSX 10.6 SDK,并且有10.6作为部署目标。

1 个答案:

答案 0 :(得分:0)

I was having some other issues with the project in question, so I rebuilt all three projects and this issue went away.

I am guessing there was some sort of issue with the Xcode project itself as I believe it was probably upgraded from at least two previous major versions of Xcode.

Lesson here seems to be, rebuild the project files themselves and see if that fixes the issues!

相关问题