Skip to content

Commit

Permalink
Use paths instead of URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
glbrntt committed Dec 20, 2024
1 parent 2ce846d commit f65d553
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Examples/reflection-server/Sources/ReflectionServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -40,7 +37,7 @@ struct ReflectionServer: AsyncParsableCommand {
transportSecurity: .plaintext
),
services: [
try ReflectionService(descriptorSetFileURLs: urls ?? []),
try ReflectionService(descriptorSetFilePaths: paths),
EchoService(),
]
)
Expand Down

0 comments on commit f65d553

Please sign in to comment.