Skip to content

Commit e51b7de

Browse files
authored
fix(sidekick/swift): missing import on Linux (#5259)
On Linux we need an additional import for `URLSession` (the standard HTTP client).
1 parent f49f20f commit e51b7de

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

internal/sidekick/swift/templates/common/service.swift.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ limitations under the License.
2121
{{/Codec.BoilerPlate}}
2222

2323
import Foundation
24+
{{! On Linux we need this additional import for `URLSession`. }}
25+
#if canImport(FoundationNetworking)
26+
import FoundationNetworking
27+
#endif
2428
import GoogleCloudAuth
2529
import GoogleCloudGax
2630

0 commit comments

Comments
 (0)