环境 IOS15.5 Dopamine
iphone设备没有安装mobilesubstrate但是安装了ellkit,请大神帮忙看看指点
Makefile
ARCHS = arm64 arm64e
TARGET = iphone:clang:latest:15.5
INSTALL_TARGET_PROCESSES = SpringBoard
THEOS_PACKAGE_DIR_NAME = packages
THEOS_PLATFORM_NAME = iphoneos
include $(THEOS)/makefiles/common.mk
TWEAK_NAME = TweakDemo1
ImgCameraReplace_FILES = Tweak.x
ImgCameraReplace_CFLAGS = -fobjc-arc
ImgCameraReplace_DEPENDS = firmware (>= 15.0), ellekit
include $(THEOS_MAKE_PATH)/tweak.mk
control
Package: com.yourcompany.tweakdemo1
Name: TweakDemo1
Version: 0.0.1
Architecture: iphoneos-arm64e
Description: TweakDemo1!
Maintainer: ppp
Author: ppp
Section: Tweaks
TweakDemo1.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Filter</key>
<dict>
<key>Bundles</key>
<array>
<string>*</string>
</array>
</dict>
<key>Package</key>
<string>com.yourcompany.tweakdemo1</string>
<key>Name</key>
<string>TweakDemo1</string>
<key>Version</key>
<string>1.0.0</string>
<key>Architecture</key>
<string>iphoneos-arm64e</string>
<key>Depends</key>
<string>ellekit</string>
<key>Section</key>
<string>Tweaks</string>
<key>Description</key>
<string> tweakDemo1。</string>
<key>Maintainer</key>
<string>ppp</string>
<key>Author</key>
<string>ppp</string>
<key>Tag</key>
<dict>
<key>compatibility</key>
<array>
<string>ios-arm64e</string>
</array>
</dict>
<key>Rootless</key>
<true/>
</dict>
</plist>
Tweak.xm
#import <SpringBoard/SpringBoard.h>
#import <UIKit/UIKit.h>
%hook SpringBoard- (void)applicationDidFinishLaunching:(id)application {
%orig;
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@“Hello” message:@“Theos SUCCESS” preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@“好的” style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
}];
[alert addAction:okAction];
[application presentViewController:alert animated:YES completion:nil];
}
%end