1

I was learning about making mobile substrate tweak when i came across a tutorial with a source codes in it. To further understand it, i decided to test it out

The codes:

  %hook SBApplicationIcon
  -(void)launch
  {
  NSString *appName = [self displayName];
  NSString *message = [NSString stringWithFormat:@"The app %@ has been launched, lol", appName, nil];
  UIAlertView *alert = [[UIAlertView alloc] initWithTitle:appName message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
  [alert show];
  [alert release];
  %orig;
  }
  %end

I used theos on my IOS phone and made a tweak and paste this code into the "tweak.xm"
I went to "makefile" and added

test_FRAMEWORKS = UIKit

if u ever wonder what is in my test.plist, here is it

com.apple.springboard

Next i went to mobile terminal and did this

su
alpine
cd test
make

Then u copied the .dylib and the "test.plist" file that theos made and pasted it in /Library/MobileSubstrate/DynamicLibraries

After that i respring my device and tried launching an app, but nothing happened. Everything launched normally. Please help me here

junyi00
  • 792
  • 3
  • 8
  • 28

1 Answers1

1

After googling for a long time, i finally made it to work

I went to mobile terminal... and login. After that i did this

installsdk3

Then i went to my Makefile and changed it to this

SDKVERSION = 3

include theos/makefiles/common.mk

TWEAK_NAME = test
test_FILES = Tweak.xm
test_FRAMEWORKS = UIKit Foundation

include $(THEOS_MAKE_PATH)/tweak.mk

And i remade the tweak again and it worked!

junyi00
  • 792
  • 3
  • 8
  • 28