我是越狱调整开发的新手。现在我只是想在第一次加载springboard
时获得警报对话框。
%hook Springboard
-(void)applicationDidFinishLaunching:(id)application {
%orig;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Welcome" message:@"Hello akash " delegate:nil cancelButtonTitle:@"Thanx" otherButtonTitles:nil];
[alert show];
[alert release]
}
%end
include theos/makefiles/common.mk
ARCHS = armv7 armv7s arm64
test_FRAMEWORKS= UIKit
TWEAK_NAME = test
test_FILES = Tweak.xm
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 SpringBoard"
所以在这里我可以正确地编译这个调整,并且我的iphone也得到了响应。所以在这一点上我应该得到这个警报,但我没有在屏幕上得到任何东西。我错过了什么步骤
我将
一起使用iPhone 5s
与ios 7.1.2
修改
我可以看到控制台输出记录错误
<Error>: MS:Error: dlopen(/Library/MobileSubstrate/DynamicLibraries/test.dylib, 9): no suitable image found. Did find:
/Library/MobileSubstrate/DynamicLibraries/test.dylib: no matching architecture in universal wrapper
然后我也会使用file test.dylib
test.dylib: Mach-O universal binary with 2 architectures
test.dylib (for architecture armv7): Mach-O dynamically linked shared library arm
test.dylib (for architecture armv7s): Mach-O dynamically linked shared library arm
这意味着,我没有得到arm64 architecture
这就是为什么我的iPhone 5s
因为64bit
而失败,有人会指出如何做到这一点吗?
答案 0 :(得分:2)
最后我找到了解决方案,
只需要先放ARCHS = armv7 armv7s arm64
include theos/makefiles/common.mk
所以现在我的 makefile 是
ARCHS = armv7 armv7s arm64
include theos/makefiles/common.mk
test_FRAMEWORKS= UIKit
TWEAK_NAME = test
test_FILES = Tweak.xm
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 SpringBoard"
答案 1 :(得分:0)
我相信你挂错了功能?您正在寻找的功能是
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions