diff --git a/Sources/GRPCInteropTests/InteroperabilityTestCases.swift b/Sources/GRPCInteropTests/InteroperabilityTestCases.swift index fdaa327..f143791 100644 --- a/Sources/GRPCInteropTests/InteroperabilityTestCases.swift +++ b/Sources/GRPCInteropTests/InteroperabilityTestCases.swift @@ -17,7 +17,11 @@ internal import GRPCCore private import SwiftProtobuf +#if canImport(FoundationEssentials) +private import struct FoundationEssentials.Data +#else private import struct Foundation.Data +#endif /// This test verifies that implementations support zero-size messages. Ideally, client /// implementations would verify that the request and response were zero bytes serialized, but diff --git a/Sources/GRPCInteropTests/TestService.swift b/Sources/GRPCInteropTests/TestService.swift index 4381b93..ef2d7cc 100644 --- a/Sources/GRPCInteropTests/TestService.swift +++ b/Sources/GRPCInteropTests/TestService.swift @@ -14,10 +14,15 @@ * limitations under the License. */ -private import Foundation public import GRPCCore private import SwiftProtobuf +#if canImport(FoundationEssentials) +private import struct FoundationEssentials.Data +#else +private import struct Foundation.Data +#endif + public struct TestService: Grpc_Testing_TestService.ServiceProtocol { public init() {}