]> git.saurik.com Git - patcyh.git/commitdiff
On iOS 9.2+ use "best effort" Substrate extension.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 22 Jul 2016 09:09:04 +0000 (02:09 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 22 Jul 2016 09:09:04 +0000 (02:09 -0700)
extrainst_.mm
makefile
patcyh.plist [new file with mode: 0644]

index fab3c6e3bc4fba3e263da18153d7f6bd8f7362e9..a4ccef2a432127d659d63236b3dcbb16abf3e715 100644 (file)
@@ -37,10 +37,12 @@ int main(int argc, const char *argv[]) {
 
     NSAutoreleasePool *pool([[NSAutoreleasePool alloc] init]);
 
-    if (!PatchLaunch(kCFCoreFoundationVersionNumber < 1200, false))
+    bool modern(kCFCoreFoundationVersionNumber > 1242);
+
+    if (!PatchLaunch(modern || kCFCoreFoundationVersionNumber < 1200, false))
         return 1;
 
-    if (!PatchInstall(false, false))
+    if (!PatchInstall(modern, false))
         return 1;
 
     [pool release];
index dca5f8ed4f5664f2b606b05cdba535c6159d0735..7ebd9c087a0c707ab333b5c6dab118284a5dae17 100644 (file)
--- a/makefile
+++ b/makefile
@@ -22,6 +22,9 @@ lib%.dylib: %.mm
 
 package: all $(control)
        sudo rm -rf _
+       mkdir -p _/Library/MobileSubstrate/DynamicLibraries
+       cp -a patcyh.plist _/Library/MobileSubstrate/DynamicLibraries
+       ln -s /usr/lib/libpatcyh.dylib _/Library/MobileSubstrate/DynamicLibraries/patcyh.dylib
        mkdir -p _/usr/lib
        cp -a $(library) _/usr/lib
        mkdir -p _/DEBIAN
diff --git a/patcyh.plist b/patcyh.plist
new file mode 100644 (file)
index 0000000..df3d1b8
--- /dev/null
@@ -0,0 +1,4 @@
+Filter = {
+    Executables = ("lsd", "installd");
+    Mode = "Any";
+};