fix: discover XPC-backed application bundles
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user