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