fix: discover XPC-backed application bundles

This commit is contained in:
Valdemar Lorenzen
2026-10-15 10:04:08 +02:00
parent 7eb52bd1db
commit 796e8a820c
4 changed files with 25 additions and 1 deletions
+2 -1
View File
@@ -68,7 +68,8 @@ public enum ApplicationCatalog {
// Never expose helpers inside an application, even if its bundle is invalid.
guard visitedApplications.insert(url).inserted,
let bundle = Bundle(url: url),
bundle.object(forInfoDictionaryKey: "CFBundlePackageType") as? String == "APPL",
let packageType = bundle.object(forInfoDictionaryKey: "CFBundlePackageType") as? String,
packageType == "APPL" || packageType == "XPC!",
let executable = bundle.executableURL,
let executableValues = try? executable.resourceValues(forKeys: [.isRegularFileKey]),
executableValues.isRegularFile == true,