Skip to content

Commit f65d553

Browse files
committed
Use paths instead of URLs
1 parent 2ce846d commit f65d553

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Examples/reflection-server/Sources/ReflectionServer.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ struct ReflectionServer: AsyncParsableCommand {
2828

2929
func run() async throws {
3030
// Find descriptor sets ('*.pb') bundled with this example.
31-
let urls = Bundle.module.urls(
32-
forResourcesWithExtension: "pb",
33-
subdirectory: "DescriptorSets"
34-
)
31+
let paths = Bundle.module.paths(forResourcesOfType: "pb", inDirectory: "DescriptorSets")
3532

3633
// Start the server with the reflection service and the echo service.
3734
let server = GRPCServer(
@@ -40,7 +37,7 @@ struct ReflectionServer: AsyncParsableCommand {
4037
transportSecurity: .plaintext
4138
),
4239
services: [
43-
try ReflectionService(descriptorSetFileURLs: urls ?? []),
40+
try ReflectionService(descriptorSetFilePaths: paths),
4441
EchoService(),
4542
]
4643
)

0 commit comments

Comments
 (0)