I\'m trying to get theos working on OSX Mavericks. I recently purchased an iPhone 5s and have since then jailbroken it. Now I am trying to get Theos working so I can start w
It's an old question, but still I figured I should answer it for people who have the same question. You need to call objc_getClass
for it to work, like this:
UIAlertView *alert = [[objc_getClass("UIAlertView") alloc] initWithTitle:@"TEST" message:@"message...." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
Note that this is not required on the left hand side of the assignment.
To fix the alert issue, you must include UIKit/UIKit.h (Sorry, I can't comment)
If you're using iOS 7, you have to hook the correct method: try -(void)launchFromLocation:(int)location
.
Because it uses a parameter, your code should look like this:
-(void)launchFromLocation:(int)location {
// your stuff
%orig(location);
}
You need to include the UIKit framework in your Makefile by adding XXX_FRAMEWORKS = UIKit where XXX is your project name
I would say update your Headers. Download new set from rpetrich
Edit your makefile and insert the following at the top:
export ARCHS = armv7 armv7s arm64
export TARGET = iphone:clang:7.0:7.0
Also, link the Foundation
framework with your tweak.