make的时候有好些个
#error architecture not supported
fatal error:
‘libkern/machine/OSByteOrder.h’ file not found
也看了论坛里相关帖子 都和我的不太一样
这个是Tweak.xm代码
#import "MailRelate.h"
#import "PLWihteListViewController.h"
%hook MailboxPickerController
- (void)viewDidLoad {
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"SettingWL" style:UIBarButtonItemStylePlain target:self action:@selector(settingWhiteList:)];
self.navigationItem.leftBarButtonItem = item;
%orig;
}
%new
- (void)settingWhiteList
{
PLWihteListViewController *vc = [PLWihteListViewController new];
[self.navigationController pushViewController:vc animated:YES];
}
%end
下面是makefile
THEOS_DEVICE_IP = 192.168.1.113
ARCHS = armv7 arm64
TARGET = iphone:latest:8.0
include theos/makefiles/common.mk
TWEAK_NAME = iosremailbox
iosremailbox_FILES = PLWihteListViewController.m PLMailInfo.m Tweak.xm
iosremailbox_FRAMEWORKS = UIKit CoreGraphics
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 MobileMail"