Мой Makefile выглядит следующим образом:< /p>
Код: Выделить всё
export ARCHS = armv7 arm64
export TARGET = iphone:clang:latest:8.0
include $(THEOS)/makefiles/common.mk
TWEAK_NAME = YellowSquare
YellowSquare_FILES = Tweak.xm
YellowSquare_FRAMEWORKS = UIKit Foundation
YellowSquare_LDFLAGS = -lAlertLib
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 SpringBoard"
Код: Выделить всё
#import "AlertLib.h"
%hook AppDelegate
- (void) applicationDidBecomeActive:(UIApplication *) application
{
static dispatch_once_t once;
dispatch_once(&once, ^{
UIView *yellowSquareView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
yellowSquareView.backgroundColor = [UIColor yellowColor];
UILabel *tweakLabel = [[UILabel alloc] initWithFrame:yellowSquareView.bounds];
tweakLabel.backgroundColor = [UIColor clearColor];
tweakLabel.text = @"TWEAK";
tweakLabel.font = [UIFont systemFontOfSize:25];
tweakLabel.textAlignment = NSTextAlignmentCenter;
[yellowSquareView addSubview:tweakLabel];
UIWindow *window = [UIApplication sharedApplication].keyWindow;
yellowSquareView.center = window.center;
[window addSubview:yellowSquareView];
[[AlertLib sharedInstance] showAlert];
});
%orig;
}
%end
Подробнее здесь: https://stackoverflow.com/questions/452 ... file-to-it
Мобильная версия