Theos:无法覆盖AppDelegate方法

时间:2014-12-21 16:05:32

标签: ios objective-c jailbreak theos method-overriding

我想用Theos为应用程序做一个Tweak。我想要更改的方法是在AppDelegate中。

每次打开应用程序时,我都会尝试将setupBG方法的参数设置为YES。然而,应用程序加载好像什么也没发生,参数保持不变......

过滤器设置为应用程序的Bundle标识符。

这是Tweak代码:(我尝试了很多可能的解决方案,但都没有工作......)

@interface AppDelegate: UIResponder

-(void) setupBG: (BOOL)bg;

@end

%hook AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        %orig;
        [self setupBG:YES];
        return YES;
}
%end

Tweak编译时没有错误,并且已成功安装到设备上。 知道为什么这个论点没有被覆盖?

0 个答案:

没有答案