]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
MacAppStoreUpdateDetector: Detect StoreAEService correctly
authorRoopesh Chander <roop@roopc.net>
Thu, 22 Jul 2021 07:08:45 +0000 (12:38 +0530)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 22 Sep 2021 04:58:14 +0000 (06:58 +0200)
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>
Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift

index 7c83f3bd5b923fc2c2688023a6e4f4a70dfde8f1..bcbe28f3577abc3f75c841604c5fecca94e5c85f 100644 (file)
@@ -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
     }