API: Rename to NetworkClient, client as instance. (#1405)

- Part of #1404.
- COMPATIBILITY: Breaking change to client API. XPC protocol and
persistent data remain fully compatibile.
- Renames `ClientNetwork` to `NetworkClient`, aligning with
`ContainerClient`.
- Client uses instance methods instead of utility functions, with an
`init(serviceIdentifier:)` for the XPC service name. The value is
currently unused.
This commit is contained in:
J Logan
2026-04-08 13:41:12 -07:00
committed by GitHub
parent a557ce80a5
commit a1981c30ac
12 changed files with 176 additions and 116 deletions
@@ -265,7 +265,8 @@ extension Application {
// Enable Rosetta only if the user didn't ask to disable it
config.rosetta = useRosetta
guard let defaultNetwork = try await ClientNetwork.builtin else {
let networkClient = NetworkClient()
guard let defaultNetwork = try await networkClient.builtin else {
throw ContainerizationError(.invalidState, message: "default network is not present")
}
guard case .running(_, _) = defaultNetwork else {