【发布时间】:2013-08-08 06:55:15
【问题描述】:
我关注了http://brandontreb.com/beginning-jailbroken-ios-development-building-and-deployment
进行调整。一切似乎都很好,make package install 成功了,
但是当我的 iPhone 重新启动时,“helloworld”框并没有出现,
有大神知道怎么解决吗?
我的 xcode 是 4.6,安装的是 sdk5.1
我的 iPhone 是 iOS6.1.2
我设置了那些
export THEOS=/opt/theos/
export SDKVERSION=5.1
export THEOS_DEVICE_IP=192.168.1.101
这是 Makefile
export ARCHS=armv7
export TARGET=iphone:5.1
include $(THEOS)/makefiles/common.mk
helloworld_FRAMEWORKS = UIKit
TWEAK_NAME = helloworld
helloworld_FILES = Tweak.xm
include $(THEOS)/makefiles/tweak.mk
这是 Tweak.xm
#import <SpringBoard/SpringBoard.h>
%hook SpringBoard
-(void)applicationDidFinishLaunching:(id)application {
%orig;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Welcome"
message:@"Hello world"
delegate:nil
cancelButtonTitle:@"123"
otherButtonTitles:nil];
[alert show];
[alert release];
}
%end
【问题讨论】:
-
所以你把你的代码放在makefile而不是源文件中...
helloworld_FILES = Tweak.xm,NOTtweak.mk... -
编辑错误,谢谢
-
@userXXX 然后将
applicationDidFinishLaunching:(id)application更改为application:(id)app didFinishLaunchingWithOptions:(id)opt。