Skip to content

Commit 5203317

Browse files
committed
Fix: consolidate UserDefaults service name
This change consolidates the UserDefaults service name com.apple.container.defaults to a single constant under the extension and also renamed the extension file Signed-off-by: Yibo Zhuang <yibzhuang@gmail.com>
1 parent 7ca5a43 commit 5203317

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

Sources/Services/ContainerNetworkService/AllocationOnlyVmnetNetwork.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public actor AllocationOnlyVmnetNetwork: Network {
6464
]
6565
)
6666

67-
if let suite = UserDefaults.init(suiteName: "com.apple.container.defaults") {
67+
if let suite = UserDefaults.init(suiteName: UserDefaults.appSuiteName) {
6868
// TODO: Make the suiteName a constant defined in ClientDefaults and use that.
6969
// This will need some re-working of dependencies between NetworkService and Client
7070
defaultSubnet = suite.string(forKey: "network.subnet") ?? defaultSubnet

Sources/Services/ContainerNetworkService/UserDefaults+Backpack.swift renamed to Sources/Services/ContainerNetworkService/UserDefaults+Container.swift

File renamed without changes.

Sources/Services/ContainerSandboxService/SandboxService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public actor SandboxService {
9393

9494
let fqdn: String
9595
if let hostname = config.hostname {
96-
if let suite = UserDefaults.init(suiteName: "com.apple.container.defaults"),
96+
if let suite = UserDefaults.init(suiteName: UserDefaults.appSuiteName),
9797
let dnsDomain = suite.string(forKey: "dns.domain"),
9898
!hostname.contains(".")
9999
{

0 commit comments

Comments
 (0)