From f65d5537e5746c57bb50b8449db887779cbbf909 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Fri, 20 Dec 2024 15:08:05 +0000 Subject: [PATCH] Use paths instead of URLs --- Examples/reflection-server/Sources/ReflectionServer.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Examples/reflection-server/Sources/ReflectionServer.swift b/Examples/reflection-server/Sources/ReflectionServer.swift index 5b6d0a735..1e70abe2c 100644 --- a/Examples/reflection-server/Sources/ReflectionServer.swift +++ b/Examples/reflection-server/Sources/ReflectionServer.swift @@ -28,10 +28,7 @@ struct ReflectionServer: AsyncParsableCommand { func run() async throws { // Find descriptor sets ('*.pb') bundled with this example. - let urls = Bundle.module.urls( - forResourcesWithExtension: "pb", - subdirectory: "DescriptorSets" - ) + let paths = Bundle.module.paths(forResourcesOfType: "pb", inDirectory: "DescriptorSets") // Start the server with the reflection service and the echo service. let server = GRPCServer( @@ -40,7 +37,7 @@ struct ReflectionServer: AsyncParsableCommand { transportSecurity: .plaintext ), services: [ - try ReflectionService(descriptorSetFileURLs: urls ?? []), + try ReflectionService(descriptorSetFilePaths: paths), EchoService(), ] )