Theos for armv7 and arm64

前端 未结 6 1924
旧巷少年郎
旧巷少年郎 2020-12-30 17:54

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

相关标签:
6条回答
  • 2020-12-30 18:07

    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.

    0 讨论(0)
  • 2020-12-30 18:12

    To fix the alert issue, you must include UIKit/UIKit.h (Sorry, I can't comment)

    0 讨论(0)
  • 2020-12-30 18:19

    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);
    }
    
    0 讨论(0)
  • 2020-12-30 18:23

    You need to include the UIKit framework in your Makefile by adding XXX_FRAMEWORKS = UIKit where XXX is your project name

    0 讨论(0)
  • 2020-12-30 18:26

    I would say update your Headers. Download new set from rpetrich

    0 讨论(0)
  • 2020-12-30 18:32

    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.

    0 讨论(0)
提交回复
热议问题