【问题标题】:Theos Hooking an AppDelegate I make some errorsTheos Hooking an AppDelegate 我犯了一些错误
【发布时间】:2012-10-11 16:43:32
【问题描述】:

这是我的代码...我有一些错误...你能帮帮我吗?

@interface PdfViewerAppDelegate : UIViewController
@property(assign) BOOL myVariable;
 -(void)setup;

@end



%hook PdfViewerAppDelegate

-(void)setup{

    %orig;

    myVariable=1;
}

%end

这就是错误

Compiling Tweak.xm...
Tweak.xm: In function ‘void _logos_method$_ungrouped$PdfViewerAppDelegate$setup(PdfViewerAppDelegate*, objc_selector*)’:
Tweak.xm:15: error: ‘myVariable’ was not declared in this scope
make[2]: *** [obj/Tweak.xm.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [GG.all.tweak.variables] Error 2

【问题讨论】:

    标签: iphone ios cydia tweak


    【解决方案1】:

    将“myVariable”声明为全局变量

    【讨论】:

    • 如何使用 Logos 语言做到这一点?
    • self.myVariable=1;或静态 BOOL myVariable; @interface PdfViewerAppDelegate 之前:UIViewController
    • 好的!但现在我得到了这个错误...... Tweak.xm:1: error: expected constructor, destructor, or type conversion before ‘.’ token
    • 好的,我使用 BOOL myVariable 解决了错误;在@interface 之前...现在我得到这个唯一的错误... ld: library not found for -lsubstrate 是什么意思?错过了什么?
    • 这意味着你在你的makefile中链接了libsubstrate.dylib,但是链接器在你的路径中找不到这个dylib。
    猜你喜欢
    • 1970-01-01
    • 2021-10-17
    • 2022-10-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-12
    • 2014-11-14
    • 2013-01-01
    相关资源
    最近更新 更多