【发布时间】:2012-02-19 20:49:52
【问题描述】:
我想知道如何制作基本的“Hello, World!” MobileSubstrate 调整。
【问题讨论】:
标签: iphone cydia cydia-substrate
我想知道如何制作基本的“Hello, World!” MobileSubstrate 调整。
【问题讨论】:
标签: iphone cydia cydia-substrate
Getting Started 将帮助您设置开发环境。这个IPF 将帮助您了解构建您的调整/应用程序,您可以查看我的github 以获取代码示例。
【讨论】:
我在另一个帖子中写了一个答案,显然有些人非常喜欢;看看here。
不过,@EvilPenguin 的回答是完全正确的,我只是在这里和那里解释了几件事,但它最终会将你重定向到同一个地方。
【讨论】:
#import <SpringBoard/SpringBoard.h> // for SBScreenFlash
%hook SBAwayLockBar
-(void)unlock // the method you’re hooking
{
%orig;
[[%c(SBScreenFlash) sharedInstance] flash];
}
%end
如果您使用滑块解锁您的设备,它会截取您的屏幕。这不是一个好的调整,但这是你所要求的。
#import <SpringBoard/SpringBoard.h> // for SBScreenFlash
%hook SBAwayLockBar
-(void)unlock // the method you’re hooking
{
%orig;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello World!" message:@"my first Tweak" delegate:nil cancelButtonTitle:@"Cool" otherButtonTitles:nil];
[alert show];
[alert release];
}
%end
这将提示您向您说 hello world ;) 玩得开心
【讨论】: