gpt4 book ai didi

iOS越狱: simple alert is not getting displayed in `applicationDidFinishLaunching`

转载 作者:行者123 更新时间:2023-11-29 10:30:42 24 4
gpt4 key购买 nike

我是越狱调整开发的新手。现在我只想在第一次加载我的 springboard 时获得警告对话框。

调整.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 也可以重新启动。所以在这一点上我应该得到这个警报,但我没有在屏幕上看到任何东西。我错过了什么步骤

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 架构,这就是为什么它在我的 iPhone 5s 上失败的原因,因为它是 64 位,任何人都可以指出如何这样做?

最佳答案

最后我找到了解决方案

只需要把 ARCHS = armv7 armv7s arm64 放在前面 包含theos/makefiles/common.mk


所以现在我的ma​​kefile

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"

关于iOS越狱: simple alert is not getting displayed in `applicationDidFinishLaunching` ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29804741/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com