From 74bceaf65891e1a125520b0c42ee7bc018e92a05 Mon Sep 17 00:00:00 2001 From: Lessica <82flex@gmail.com> Date: Sun, 12 Jan 2025 00:18:06 +0800 Subject: [PATCH] bugfix: ignore broken weak links Signed-off-by: Lessica <82flex@gmail.com> --- TrollFools/InjectorV3+MachO.swift | 7 ++++++- TrollFools/Version.Debug.xcconfig | 2 +- TrollFools/Version.xcconfig | 2 +- layout/DEBIAN/control | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/TrollFools/InjectorV3+MachO.swift b/TrollFools/InjectorV3+MachO.swift index c34c4e1..6e1119b 100644 --- a/TrollFools/InjectorV3+MachO.swift +++ b/TrollFools/InjectorV3+MachO.swift @@ -165,6 +165,11 @@ extension InjectorV3 { resolvedName = resolvedName .replacingOccurrences(of: "@rpath/", with: frameworksDirectoryURL.path + "/") - return URL(fileURLWithPath: resolvedName) + let resolvedURL = URL(fileURLWithPath: resolvedName) + guard FileManager.default.fileExists(atPath: resolvedURL.path) else { + return nil + } + + return resolvedURL } } diff --git a/TrollFools/Version.Debug.xcconfig b/TrollFools/Version.Debug.xcconfig index dd14e2c..ace9c9d 100644 --- a/TrollFools/Version.Debug.xcconfig +++ b/TrollFools/Version.Debug.xcconfig @@ -9,4 +9,4 @@ // https://help.apple.com/xcode/#/dev745c5c974 DEBUG_VERSION = 2.9 -DEBUG_BUILD_NUMBER = 202501092 +DEBUG_BUILD_NUMBER = 202501121 diff --git a/TrollFools/Version.xcconfig b/TrollFools/Version.xcconfig index 62c420e..2b38f77 100644 --- a/TrollFools/Version.xcconfig +++ b/TrollFools/Version.xcconfig @@ -9,4 +9,4 @@ // https://help.apple.com/xcode/#/dev745c5c974 VERSION = 2.9 -BUILD_NUMBER = 20 +BUILD_NUMBER = 21 diff --git a/layout/DEBIAN/control b/layout/DEBIAN/control index 810a504..5b779db 100644 --- a/layout/DEBIAN/control +++ b/layout/DEBIAN/control @@ -1,6 +1,6 @@ Package: wiki.qaq.trollfools Name: TrollFools -Version: 2.9-20 +Version: 2.9-21 Section: Applications Depends: firmware (>= 14.0) Architecture: iphoneos-arm