iOS 越狱:“applicationDidFinishLaunching”中未显示简单警报
iOS jailbreak: simple alert is not getting displayed in `applicationDidFinishLaunching`
我是越狱调整的新手 development.Now 我只想在我第一次加载 springboard
时收到警报对话框。
Tweak.mx
%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 在这一点上得到 respring.So 我应该得到这个警报,但是我在 screen.What 步骤上没有得到任何东西我失踪了
I am using iPhone 5s
with 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
,任何人都可以指出如何做到这一点吗?
终于找到解决方案,
只需要在前面加上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"
我相信你钩错了函数?您要查找的函数是
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
我是越狱调整的新手 development.Now 我只想在我第一次加载 springboard
时收到警报对话框。
Tweak.mx
%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 在这一点上得到 respring.So 我应该得到这个警报,但是我在 screen.What 步骤上没有得到任何东西我失踪了
I am using
iPhone 5s
withios 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
,任何人都可以指出如何做到这一点吗?
终于找到解决方案,
只需要在前面加上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"
我相信你钩错了函数?您要查找的函数是
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions