首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Mobilesubstrate调整徽标编译问题

Mobilesubstrate调整徽标编译问题
EN

Stack Overflow用户
提问于 2012-02-20 15:46:41
回答 1查看 808关注 0票数 0

我试图在MobileSafari的书签中捕获函数的参数。但是我得到了编译错误。我怀疑WebBookmark类是未声明的,并且在Safari中找不到为其声明接口的头文件。所以我补充道:

代码语言:javascript
复制
#import <WebKit/WebKit.h>
#import <WebCore/WebCore.h>

到我的Tweak.mk。有人知道在哪里可以找到他们的界面吗?下面是我的makefile,调整和输出。谢谢!

输出:

代码语言:javascript
复制
Making all for tweak TestingTweak...
 Preprocessing Tweak.xm...
 Compiling Tweak.xm...
In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITableView.h:11,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h:11,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityAdditions.h:10,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:12,
                 from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10,
                 from /opt/theos/Prefix.pch:4,
                 from <command-line>:0:
/opt/theos/include/UIKit/UISwipeGestureRecognizer.h:6:26: error: Availability2.h: No such file or directory
Tweak.xm:30: error: ‘WebBookmark’ has not been declared
Tweak.xm:30: error: ‘WebBookmark’ has not been declared
Tweak.xm:30: error: expected initializer before ‘*’ token
Tweak.xm:30: error: expected initializer before ‘*’ token
Tweak.xm:30: error: ‘WebBookmark’ has not been declared
Tweak.xm:30: error: ‘WebBookmark’ has not been declared
Tweak.xm:30: error: expected initializer before ‘*’ token
Tweak.xm:30: error: expected initializer before ‘*’ token
Tweak.xm:464: error: ‘WebBookmark’ has not been declared
Tweak.xm:465: error: expected initializer before ‘*’ token
Tweak.xm:466: error: ‘WebBookmark’ has not been declared
Tweak.xm:467: error: expected initializer before ‘*’ token
Tweak.xm: In function ‘void _logosLocalInit()’:
Tweak.xm:2569: error: ‘_logos_method$_ungrouped$FolderPickerViewController$parentBookmark’ was not declared in this scope
Tweak.xm:2569: error: ‘_logos_orig$_ungrouped$FolderPickerViewController$parentBookmark’ was not declared in this scope
Tweak.xm:2569: error: ‘_logos_method$_ungrouped$FolderPickerViewController$movingBookmark’ was not declared in this scope
Tweak.xm:2569: error: ‘_logos_orig$_ungrouped$FolderPickerViewController$movingBookmark’ was not declared in this scope
make[2]: *** [obj/Tweak.xm.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [TestingTweak.all.tweak.variables] Error 2

WHAt进去了:

代码语言:javascript
复制
#import <UIKit/UIKit2.h>

%hook FolderPickerViewController
- (id)initWithDelegate:(id)arg1 bookmarkCollection:(id)arg2 { %log; id r = %orig; NSLog(@" = %@", r); return r; }
- (void)dealloc { %log; %orig; }
- (int)tableView:(id)arg1 numberOfRowsInSection:(int)arg2 { %log; int r = %orig; NSLog(@" = %d", r); return r; }
- (id)tableView:(id)arg1 cellForRowAtIndexPath:(id)arg2 { %log; id r = %orig; NSLog(@" = %@", r); return r; }
- (void)tableView:(id)arg1 didSelectRowAtIndexPath:(id)arg2 { %log; %orig; }
- (void)_cancel { %log; %orig; }
- (void)willShowForBookmark:(id)arg1 parent:(id)arg2 { %log; %orig; }
// the following properties seem to be the culprit
- (void)setParentBookmark:(WebBookmark *)parentBookmark { %log; %orig; }
- (WebBookmark *)parentBookmark { %log; WebBookmark * r = %orig; NSLog(@" = %@", r); return r; }
- (void)setMovingBookmark:(WebBookmark *)movingBookmark { %log; %orig; }
- (WebBookmark *)movingBookmark { %log; WebBookmark * r = %orig; NSLog(@" = %@", r); return r; }

%结束

makefile中的内容:

代码语言:javascript
复制
SDKVERSION=5.0
include theos/makefiles/common.mk

TWEAK_NAME = TestingTweak
TestingTweak_FILES = Tweak.xm

include $(THEOS_MAKE_PATH)/tweak.mk

过滤器:

代码语言:javascript
复制
{ Filter = { Bundles = ( "com.apple.mobilesafari" ); }; }
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-02-22 11:40:52

WebBookmark来自WebBookmarks.framework。这是一个私有的框架,你必须对它进行class-dump

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9357733

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档