Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a48b691

Browse files
committedJan 24, 2025·
add app group entitlement
1 parent b43a407 commit a48b691

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed
 

‎Coder Desktop/Coder Desktop.xcodeproj/project.pbxproj

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,13 @@
217217
);
218218
target = 9616792F2CFF117300B2B6DF /* VPN */;
219219
};
220+
AAC385C72D4339C600F6DFB4 /* Exceptions for "Coder Desktop" folder in "Coder Desktop" target */ = {
221+
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
222+
membershipExceptions = (
223+
Info.plist,
224+
);
225+
target = 961678FB2CFF100D00B2B6DF /* Coder Desktop */;
226+
};
220227
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
221228

222229
/* Begin PBXFileSystemSynchronizedRootGroup section */
@@ -230,6 +237,9 @@
230237
};
231238
961678FE2CFF100D00B2B6DF /* Coder Desktop */ = {
232239
isa = PBXFileSystemSynchronizedRootGroup;
240+
exceptions = (
241+
AAC385C72D4339C600F6DFB4 /* Exceptions for "Coder Desktop" folder in "Coder Desktop" target */,
242+
);
233243
path = "Coder Desktop";
234244
sourceTree = "<group>";
235245
};
@@ -994,7 +1004,7 @@
9941004
DYLIB_COMPATIBILITY_VERSION = 1;
9951005
DYLIB_CURRENT_VERSION = 1;
9961006
DYLIB_INSTALL_NAME_BASE = "@rpath";
997-
ENABLE_MODULE_VERIFIER = YES;
1007+
ENABLE_MODULE_VERIFIER = NO;
9981008
GENERATE_INFOPLIST_FILE = YES;
9991009
INFOPLIST_KEY_NSHumanReadableCopyright = "";
10001010
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -1396,7 +1406,7 @@
13961406
DYLIB_COMPATIBILITY_VERSION = 1;
13971407
DYLIB_CURRENT_VERSION = 1;
13981408
DYLIB_INSTALL_NAME_BASE = "@rpath";
1399-
ENABLE_MODULE_VERIFIER = YES;
1409+
ENABLE_MODULE_VERIFIER = NO;
14001410
GENERATE_INFOPLIST_FILE = YES;
14011411
INFOPLIST_KEY_NSHumanReadableCopyright = "";
14021412
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -1506,7 +1516,7 @@
15061516
DYLIB_COMPATIBILITY_VERSION = 1;
15071517
DYLIB_CURRENT_VERSION = 1;
15081518
DYLIB_INSTALL_NAME_BASE = "@rpath";
1509-
ENABLE_MODULE_VERIFIER = YES;
1519+
ENABLE_MODULE_VERIFIER = NO;
15101520
GENERATE_INFOPLIST_FILE = YES;
15111521
INFOPLIST_KEY_NSHumanReadableCopyright = "";
15121522
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";

‎Coder Desktop/Coder Desktop/Coder_Desktop.entitlements

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<true/>
1111
<key>com.apple.security.app-sandbox</key>
1212
<true/>
13+
<key>com.apple.security.application-groups</key>
14+
<array>
15+
<string>$(TeamIdentifierPrefix)com.coder.Coder-Desktop</string>
16+
</array>
1317
<key>com.apple.security.files.user-selected.read-only</key>
1418
<true/>
1519
<key>com.apple.security.network.client</key>

‎Coder Desktop/Coder Desktop/VPNService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ final class CoderVPNService: NSObject, VPNService, @preconcurrency VPNXPCClientC
6969
override init() {
7070
let networkExtDict = Bundle.main.object(forInfoDictionaryKey: "NetworkExtension") as? [String: Any]
7171
let machServiceName = networkExtDict?["NEMachServiceName"] as? String
72-
xpcConn = NSXPCConnection(serviceName: machServiceName!)
72+
xpcConn = NSXPCConnection(machServiceName: machServiceName!)
7373
xpcConn.remoteObjectInterface = NSXPCInterface(with: VPNXPCProtocol.self)
7474
xpcConn.exportedInterface = NSXPCInterface(with: VPNXPCClientCallbackProtocol.self)
7575

‎Coder Desktop/VPN/PacketTunnelProvider.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ class PacketTunnelProvider: NEPacketTunnelProvider, @unchecked Sendable {
6565
logger.debug("calling manager.startVPN")
6666
try await manager!.startVPN()
6767
logger.debug("vpn started")
68-
completionHandler.callAsFunction(nil)
68+
completionHandler(nil)
6969
} catch {
70-
completionHandler.callAsFunction(error as NSError)
70+
completionHandler(error as NSError)
7171
logger.error("error starting manager: \(error.description, privacy: .public)")
7272
}
7373
}

0 commit comments

Comments
 (0)
Please sign in to comment.