aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2021-07-22 12:38:45 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2021-09-22 06:58:14 +0200
commitba4d1e7b2183faddc3ac59a5ca18df0c75c3770f (patch)
treedcbb358899b8b197f93fef8a5740b1db9f6733b4
parentMacAppStoreUpdateDetector: Add pid to the log (diff)
downloadwireguard-apple-ba4d1e7b2183faddc3ac59a5ca18df0c75c3770f.tar.xz
wireguard-apple-ba4d1e7b2183faddc3ac59a5ca18df0c75c3770f.zip
MacAppStoreUpdateDetector: Detect StoreAEService correctly
In macOS 10.15 and macOS 11, the quit Apple event is sent by: com.apple.AppStoreDaemon.StoreAEService In some earlier macOS release, the quit Apple event was sent by: com.apple.CommerceKit.StoreAEService Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r--Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift b/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift
index 7c83f3b..bcbe28f 100644
--- a/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift
+++ b/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift
@@ -13,7 +13,7 @@ class MacAppStoreUpdateDetector {
wg_log(.debug, message: "aevt/quit Apple event received from executable: \(executablePath)")
if executablePath.hasPrefix("/System/Library/") {
let executableName = URL(fileURLWithPath: executablePath, isDirectory: false).lastPathComponent
- return executableName == "com.apple.CommerceKit.StoreAEService"
+ return executableName.hasPrefix("com.apple.") && executableName.hasSuffix(".StoreAEService")
}
return false
}