2011-02-06 39 views
1

我在iPhone上的應用程序,並升級到最新的Xcode 4後的工作,我收到以下錯誤消息:重複類

GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Thu Jan 27 08:34:47 UTC 2011) 
Copyright 2004 Free Software Foundation, Inc. 
GDB is free software, covered by the GNU General Public License, and you are 
welcome to change it and/or distribute copies of it under certain conditions. 
Type "show copying" to see the conditions. 
There is absolutely no warranty for GDB. Type "show warranty" for details. 
This GDB was configured as "x86_64-apple-darwin".Attaching to process 3014. 
objc[3014]: Class Property is implemented in both /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/PrivateFrameworks/Notes.framework/Notes and /Users/bschiff/Library/Application Support/iPhone Simulator/4.0.2/Applications/7D73796D-01B5-4F0E-A173-E45953945FD2/Versity.app/Versity. 
One of the two will be used. Which one is undefined. 

我有一個核心數據對象調用Property,我從這個錯誤理解消息稱名爲Property的類已在SDK中的其他位置聲明。

我也意識到,解決這個問題的正確方式將重構所有代碼更改PropertyBSProperty,或者使用一些替代名稱。

這將是一個相當巨大的工程,在此之前我這樣做,我想知道如果我能的XCode在我的應用程序,而不是已定義別的地方另一種使用Property對象。這可能嗎?

謝謝

回答

0

iPhoneSimulator4.0.sdk/System/Library/PrivateFrameworks/Notes.framework/Notes表示這是一個私人類,在這種情況下,你可以做任何事情,但重構。

2

它看起來就像你發現了一個無證類(PrivateFrameworks)。不幸的是,我認爲這意味着你必須重構。

+0

+ 1是的,在使用名爲「Message」的類時遇到了這個問題。沒有辦法繞過它。 – 2011-02-06 22:51:55