#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
static id __sb = nil;
%hook SpringBoard
-(void)applicationDidFinishLaunching: (id)application
{
%orig;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"test1!"message:@"testteststes!!"delegate:self cancelButtonTitle:@"Thanks"otherButtonTitles:nil];
[alert show];
[alert release];
}
- (id)init
{
__sb = self;
return %orig;
}
- (void)alertView: (UIAlertView *)alertView clickedButtonAtIndex: (NSInteger)buttonIndex
{
//[__sb relaunchSpringBoard];
}
%new( @@: )
+ (id)sharedBoard
{
return __sb;
}
%end
I learn a basic example. After using theos compiled.Running on my ipad min2 no effect
Below is my makefile
include theos/makefiles/common.mk
TWEAK_NAME = xiao
xiao_FILES = Tweak.xm
xiao_FRAMEWORKS = UIKit
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 SpringBoard"
Great god trouble is probably where the problem is solved
thanks