我正在尝试用Objective-C进行我的第一次Cydia调整,所以我跟着this guide。我到了我要使用命令" make package install"编译我的代码的部分。当我输入此内容时,我会收到大量错误。这是我的指南中的Tweak.xm文件的代码:
#import <SpringBoard/SpringBoard.h>
%hook SpringBoard
-(void)applicationDidFinishLaunching:(id)application {
%orig;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”Hello World”
message:@”This is my first tweak and I’m happy!”
delegate:nil
cancelButtonTitle:@”Youhou!”
otherButtonTitles:nil];
[alert show];
[alert release];
}
%end
我不能因为上帝的爱而弄清楚什么是错的。我已经重新输入了我的代码大约100次,我甚至从指南中复制粘贴它以检查我是否正在制作任何拼写错误。我安装了Theos,在我的Theos文件夹中,我有一个&#34; Include&#34;我从教程中放入头文件的文件夹,以便它可以工作。
这是完整的错误代码:
sh-3.2# make package install
Making all for tweak PopupOnStart...
Preprocessing Tweak.xm...
Compiling Tweak.xm (armv7)...
In file included from Tweak.xm:1:
/Users/Admin/popuponstart/theos/include/SpringBoard/SpringBoard.h:3:26: error: cannot find interface declaration for 'UIApplication', superclass of
'SpringBoard'; did you mean 'SBApplication'?
@interface SpringBoard : UIApplication
^~~~~~~~~~~~~
SBApplication
/Users/Admin/popuponstart/theos/include/SpringBoard/SpringBoard.h:1:8: note: 'SBApplication' declared here
@class SBApplication;
^
/Users/Admin/popuponstart/theos/include/SpringBoard/SpringBoard.h:3:26: error: attempting to use the forward class 'SBApplication' as superclass of
'SpringBoard'
@interface SpringBoard : UIApplication
~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/Admin/popuponstart/theos/include/SpringBoard/SpringBoard.h:1:8: note: forward declaration of class here
@class SBApplication;
^
/Users/Admin/popuponstart/theos/include/SpringBoard/SpringBoard.h:12:31: error: unknown type name 'UIWindow'
@property (nonatomic, retain) UIWindow *window;
^
/Users/Admin/popuponstart/theos/include/SpringBoard/SpringBoard.h:12:1: error: property with 'retain (or strong)' attribute must be of object type
@property (nonatomic, retain) UIWindow *window;
^
Tweak.xm:6:1: error: unknown type name 'UIAlertView'
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello World"
^
Tweak.xm:6:24: error: use of undeclared identifier 'UIAlertView'
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello World"
^
6 errors generated.
make[3]: *** [.theos/obj/armv7/Tweak.xm.3ff78cf9.o] Error 1
make[2]: *** [.theos/obj/armv7/PopupOnStart.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [PopupOnStart.all.tweak.variables] Error 2
基本上编译器给我一个关于代码中所有内容的错误,我只是不明白。我完成了与教程中完全相同的一切。任何人都可以帮忙,有人跟着指南吗?