0

我是开发新手jailbreak tweaks,我正在使用 theos 来开发我的调整,但是当我使用 make 命令编译我的调整时遇到了一些问题。

基本上,我IOS 7 SpringBoard用 class-dump-z 转储了所有标题,并将它们全部放在 theos/include 文件夹中。我意识到有一个类被调用XXUnknownSuperClass,当我编译调整时,我从那个类中得到了一些错误。

/theos/include/Spring/SBUIAnimationController.h:8:9: error: 
      'XXUnknownSuperclass.h' file not found with <angled> include; use "quotes"
      instead
#import <XXUnknownSuperclass.h> // Unknown library
        ^~~~~~~~~~~~~~~~~~~~~~~
        "XXUnknownSuperclass.h"

/theos/include/Spring/XXUnknownSuperclass.h:14:12: error: 
      cannot find interface declaration for 'XXUnknownSuperclass'
@interface XXUnknownSuperclass (SBApplicationAdditions)

fatal error: too many errors emitted, stopping now [-ferror-limit=]

我的下一个问题是,当点击应用程序图标时,我可以挂钩SBIconViewDelegate运行自定义方法SpringBoard吗?

非常感谢您的帮助!

4

1 回答 1

0

类转储中的一些头文件不能直接使用。有一些常见的错误,可以更改如下。

#import "NSObject.h"
-> 
#import <Foundation/NSObject.h>

@class CTPhoneNumber, NSArray, NSDate, NSDictionary, NSMutableArray, NSMutableDictionary, NSObject<CTMessageAddress, NSCopying>, NSString;
->
@class CTPhoneNumber, NSArray, NSDate, NSDictionary, NSMutableArray, NSMutableDictionary, NSObject<CTMessageAddress, NSCopying>, NSString;

NSObject<CTMessageAddress><NSCopying>
->
NSObject<CTMessageAddress,NSCopying>

对于您的问题,您可以删除有关“XXUnknownSuperclass”的声明或实现,或者有时只是删除“XXUnknownSuperclass”。

我更喜欢只声明有关当前项目的接口。您也可以在 github.com 上搜索“iOS 标头”并下载他人转储和修改的标头。

通常SBIconViewDelegate是由SBIconController实现的,可以查看SBIconController的头文件和hook相关方法。

于 2014-01-03T13:12:17.797 回答