I somehow can't get this to work. I found the headers and methods using Flex 2 and modifying the return values works there. But when I put it into code absolutely nothing happens in the game.
I tried a simple game called 94% which hasn't too many options, so I thought it would be good for a start.
Tweak.xm:
#import <UIKit/UIKit.h>
%hook NPLevelMapping
-(bool)isUnlockedLevelIdentifier:(id)argument {
return true;
}
%end
%hook LLAppDelegate
-(void)applicationDidBecomeActive:(id)argument {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Title"
message:@"Message"
delegate:nil
cancelButtonTitle:@"Cancel Button"
otherButtonTitles:@"Another Button",
nil
];
[alert show];
[alert release];
}
%end
Makefile:
include theos/makefiles/common.mk
TWEAK_NAME = 94hack
94hack_FILES = Tweak.xm
94hack_FRAMEWORKS = UIKit
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 SpringBoard"
94hack.plist:
{ Filter = { Bundles = ( "com.scimob.94percent" ); }; }
Any idea what's wrong with my code?