Jump to content

5 posts in this topic

Recommended Posts

Posted
#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

 

Posted (edited)

You mean the tweak has no effect? If this is the issue. You need to compile for 64 bits devices since ipad mini 2 has A7 chip

Updated by swaglord
Posted
#import <UIKit/UIKit.h>

%hook SpringBoard
- (void)applicationDidFinishLaunching:(id)application {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Test 1" message:@"Test!" delegate:self cancelButtonTitle:@"Thanks" otherButtonTitles:nil];
[alert show];
[alert release];
}
%end

That's all you need to get the same effect

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines