我正在尝试让 theos 在 OSX Mavericks 上工作。我最近购买了一部 iPhone 5s,并从那时起越狱了。现在我正在尝试让 Theos 正常工作,这样我就可以再次开始进行一些调整。我让它在 OSX Lion 和 IOS 5 和 6 上运行。我有一个非常简单的程序,它应该在应用程序启动时显示 UIAlert。问题是,当我运行 make 命令以尝试编译我的代码时,我收到此错误:
Making all for tweak test...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
Linking tweak test...
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_UIAlertView", referenced from:
objc-class-ref in Tweak.xm.b0410391.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [obj/test.dylib.1cc22e7c.unsigned] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [test.all.tweak.variables] Error 2
Williams-MacBook-Pro-2:test williamfsmillie$
这是我的 Tweak.xm 代码:
%hook SBApplicationIcon
-(void)launch{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"TEST" message:@"message...." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
%orig;
}
%end
还有我的makefile:
export SDKVERSION=7.0
include theos/makefiles/common.mk
TWEAK_NAME = test
test_FILES = Tweak.xm
ARCHS = armv7 arm64
test_FRAMEWORKS = UIKit
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 SpringBoard"
谢谢!