Tuesday, 15 July 2014

iphone - ‘MSHookIvar’ was not declared in this scope -



iphone - ‘MSHookIvar’ was not declared in this scope -

i trying ivar, using mshookivar error : "‘mshookivar’ not declared in scope " . tried compile in iphone, , mac, in both have error.

here code:

#import "substrate.h" %hook sbawaycontroller - (void)_unlockwithsound:(bool)arg1 unlocksource:(int)arg2 isautounlock:(bool)arg3 bypasspinlock:(bool)arg4{ uibutton *mybutton = [uibutton buttonwithtype:uibuttontyperoundedrect]; mybutton.frame = cgrectmake(21, 80, 100, 35); [mybutton settitle:@"my button" forstate:uicontrolstatenormal]; [mybutton addtarget:self action:@selector(mybuttonpressed) forcontrolevents:uicontroleventtouchupinside]; sbuicontroller *ui = mshookivar<id>(self, "_uicontroller"); [[ui window ] addsubview:mybutton]; %orig(arg1,arg2,arg3,arg4); } %end %hook sbuicontroller - (id)window{ homecoming %orig; } %end

i had same problem seek using %orig; instead of %orig(arg1,arg2,arg3,arg4);. remember allow me know how goes

iphone objective-c theos

No comments:

Post a Comment