From 9dc7713bd056fd5082ef417ea34b67f5189d8f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 20 Sep 2023 21:16:58 +0800 Subject: [PATCH] Fix iCloud profile on macos --- SystemExtension/PacketTunnelProvider.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/SystemExtension/PacketTunnelProvider.swift b/SystemExtension/PacketTunnelProvider.swift index 1d5dccc..4db3009 100644 --- a/SystemExtension/PacketTunnelProvider.swift +++ b/SystemExtension/PacketTunnelProvider.swift @@ -9,6 +9,7 @@ class PacketTunnelProvider: ExtensionProvider { } let username = usernameObject as! NSString FilePath.sharedDirectory = URL(filePath: "/Users/\(username)/Library/Group Containers/\(FilePath.groupName)") + FilePath.iCloudDirectory = URL(filePath: "/Users/\(username)/Library/Mobile Documents/iCloud~\(FilePath.packageName.replacingOccurrences(of: ".", with: "~"))").appendingPathComponent("Documents", isDirectory: true) self.username = String(username) try await super.startTunnel(options: options) }