【发布时间】:2011-11-02 15:09:47
【问题描述】:
我在针对 iOS 5 进行 Mobile Substrate 调整时遇到问题。
大多数关于 Cydia 调整的教程都有这个步骤:“下载私有框架头文件”。 所以,我从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 添加新变量吗?
非常感谢
【问题讨论】: