首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Theos调整: helloworld警报框没有出现

Theos调整: helloworld警报框没有出现
EN

Stack Overflow用户
提问于 2013-08-08 06:55:15
回答 1查看 2.1K关注 0票数 1

我跟着http://brandontreb.com/beginning-jailbroken-ios-development-building-and-deployment做了个调整。一切看起来都很好,使软件包安装成功了,

但是当我的iPhone重发时,"helloworld“框没有出现,有人知道如何解决这个问题吗?

我的xcode是4.6,sdk5.1 5.1已经安装。

我的iPhone是iOS6.1.2

我把那些

代码语言:javascript
复制
export THEOS=/opt/theos/
export SDKVERSION=5.1
export THEOS_DEVICE_IP=192.168.1.101

这是Makefile

代码语言:javascript
复制
export ARCHS=armv7
export TARGET=iphone:5.1
include $(THEOS)/makefiles/common.mk
helloworld_FRAMEWORKS = UIKit
TWEAK_NAME = helloworld
helloworld_FILES = Tweak.xm
include $(THEOS)/makefiles/tweak.mk

这是Tweak.xm

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

%hook SpringBoard

-(void)applicationDidFinishLaunching:(id)application {
%orig;

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Welcome"
    message:@"Hello world"
    delegate:nil
    cancelButtonTitle:@"123"
    otherButtonTitles:nil];
    [alert show];
    [alert release];
}

%end
EN

回答 1

Stack Overflow用户

发布于 2013-08-10 18:31:18

我想,*.plist应该是

{ Filter ={ Bundles =( "com.apple.springboard“);};}

谢谢@H2CO3,我在其他地方找到你的评论

但是在我成功地完成了helloworld的调整之后。

我用fopen连接MSHookFunction

然后我遇到一个链接错误

代码语言:javascript
复制
Making all for tweak hw...
 Preprocessing Tweak.xm...
 Compiling Tweak.xm...
 Linking tweak hw...
Undefined symbols for architecture armv7:
  "_MSHookFunction", referenced from:
      global constructors keyed to Tweak.xm.mmin Tweak.xm.51941273.o
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
make[2]: *** [.theos/obj/hw.dylib.ba964c90.unsigned] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [hw.all.tweak.variables] Error 2

我是Tweak.xm

代码语言:javascript
复制
#import "substrate.h"

static FILE * (*s_orig_fopen) ( const char * filename, const char * mode );
static FILE * my_fopen ( const char * filename, const char * mode ){
    return s_orig_fopen(filename, mode);
}

static void entry(void)  __attribute__ ((constructor));
static void entry(void) {
    MSHookFunction(fopen, my_fopen, &s_orig_fopen);
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18119693

复制
相关文章

相似问题

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