I'm trying to program a Cydia's tweak and should hook a viewcontroller class while loading and hide the view - i've tried the following:
Tweak.xm:
%hook ScoresViewController
- (void)viewWillAppear:(BOOL)fp8 {
%orig;
self.view.hidden = YES;
}
%end
but unfortunately, when trying to "make" the Tweak using THEOS , i get the following:
Making all for tweak scoresenhancer...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
Tweak.xm: In function 'void _logos_method$_ungrouped$ScoresViewController$viewWillAppear$(ScoresViewController*, objc_selector*, BOOL)':
Tweak.xm:49: error: request for member 'view' in 'self', which is of non-class type 'ScoresViewController*'
Tweak.xm: In function 'void _logos_method$_ungrouped$ScoresViewController$viewWillAppear$(ScoresViewController*, objc_selector*, BOOL)':
Tweak.xm:49: error: request for member 'view' in 'self', which is of non-class type 'ScoresViewController*'
lipo: can't figure out the architecture type of: /var/tmp//ccFsVzMR.out
make[2]: *** [obj/Tweak.xm.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [scoresenhancer.all.tweak.variables] Error 2
I will appreciate your assistance. I will also would like to understand how can I reach ivars of the customized class (i.e: ScoresViewController).