【问题标题】:SpringBoard header errors when compiling tweaks with theos使用 theos 编译调整时 SpringBoard 标头错误
【发布时间】:2014-01-03 08:26:42
【问题描述】:

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

基本上,我用 class-dump-z 转储了所有 IOS 7 SpringBoard 标头,并将它们全部放在 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=]

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

非常感谢您的帮助!

【问题讨论】:

    标签: ios jailbreak tweak theos


    【解决方案1】:

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

    #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 header”,下载别人转储和修改的headers。

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

    【讨论】:

    • 感谢您的回答。我会尽快尝试!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多