2011-11-02 21 views
0

が、私はこのステップを持っているのCydiaの微調整をすることについてのiOS 5用重複インタフェース宣言エラーが

ほとんどのチュートリアルをモバイル基板の微調整を行うことについての問題を抱えている微調整します。 https://github.com/kennytm/iphone-private-frameworks

プライベートフレームワークはiOS 3.xからダンプされるため、いくつかの新しいメソッドと変数は含まれていません。

したがって、これらの変数を私のTweak.xmに追加しました。私は私有フレームワークヘッダーもインポートしました。例えば

:私は微調整をコンパイルするとき、私はこれらのエラーを得た

しかし
#import "/opt/theos/include/UIKit/UIKit2.h" 
#import "/opt/theos/include/UIKit/UIKeyboardLayoutStar.h" 

@interface UIKeyboardImpl : UIView 
@property(assign, nonatomic) BOOL showsCandidateInline; 
@property(assign, nonatomic) BOOL showsCandidateBar; 
@end 

、:

Tweak.xm:45: error: duplicate interface declaration for class ‘UIKeyboardImpl’ 
Tweak.xm:45: error: redefinition of ‘struct UIKeyboardImpl’ 
Tweak.xm:45: error: trying to finish struct, but kicked out due to previous parse errors 

どのように私はこの問題を解決するために行うことができますか? iOS 3のプライベートフレームワークヘッダーを編集し、iOS 5から新しい変数を追加する必要がありますか?

ありがとうございます

答えて

2

カテゴリを追加すると修正されます。

@interface UIKeyboardImpl (YourCategory) 
@property(assign, nonatomic) BOOL showsCandidateInline; 
@property(assign, nonatomic) BOOL showsCandidateBar; 
@end 
+0

うわー、ありがとう!それは魅力のように機能します! :D – Hiraku

関連する問題