diff --git a/Sources/SDK/Service/HttpClient.swift b/Sources/SDK/Service/HttpClient.swift index cb439e796..fd7bdd5ae 100644 --- a/Sources/SDK/Service/HttpClient.swift +++ b/Sources/SDK/Service/HttpClient.swift @@ -1,4 +1,7 @@ import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif typealias HttpHeaders = [String: String] diff --git a/Sources/SDK/Service/HttpRequestRunner.swift b/Sources/SDK/Service/HttpRequestRunner.swift index a443263d4..0af8a65f2 100644 --- a/Sources/SDK/Service/HttpRequestRunner.swift +++ b/Sources/SDK/Service/HttpRequestRunner.swift @@ -1,4 +1,7 @@ import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif /** Exists to be able to mock http requests so we can test our HttpClient's response handling logic. diff --git a/Sources/SDK/autogenerated/AutoMockable.generated.swift b/Sources/SDK/autogenerated/AutoMockable.generated.swift index 7f8dbc116..6dda42e2e 100644 --- a/Sources/SDK/autogenerated/AutoMockable.generated.swift +++ b/Sources/SDK/autogenerated/AutoMockable.generated.swift @@ -3,6 +3,9 @@ // swiftlint:disable all import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif /** ###################################################### diff --git a/Sources/Templates/AutoMockable.stencil b/Sources/Templates/AutoMockable.stencil index f5484ba76..13fc77123 100644 --- a/Sources/Templates/AutoMockable.stencil +++ b/Sources/Templates/AutoMockable.stencil @@ -1,6 +1,9 @@ // swiftlint:disable all import Foundation +#if canImport(FoundationNetworking) +import FoundationNetworking +#endif /** ######################################################