Idiomatic Swift client libraries for Google Cloud Platform services.
The following example demonstrates creating a bucket using StorageControlClient
from GoogleCloudStorage:
import GoogleCloudStorage
public func quickstart(
client: StorageControlClient, projectId: String, bucketId: String
) async throws {
let bucket =
try await client
.createBucket(
request: .init().with {
$0.parent = "projects/_"
$0.bucketId = bucketId
$0.bucket = .init().with { bucket in
bucket.project = "projects/\(projectId)"
bucket.storageClass = "STANDARD"
bucket.location = "US"
}
})
print("successfully created bucket \(bucket)")
}
To add swift-google-cloud-storage to your project using Swift Package Manager:
swift package add-dependency https://github.com/googleapis/swift-google-cloud-storage.git --from 0.3.0
swift package add-target-dependency GoogleCloudStorage <target-name> --package swift-google-cloud-storage
For a step-by-step tutorial including authentication and project configuration, see the Getting Started Guide.
guide/): Local
DocC source files in this repository.We support and test the last 3 minor releases of Swift (currently Swift 6.2, 6.3, and 6.4). We periodically update the minimum supported version as new Swift versions become available.
Package.swift.Package.swift with platforms: [.macOS(.v15)].This project is in General Availability (GA) (as of the 0.4.0 release).
These 0.x releases are supported for production use and will receive fixes as
necessary, though we reserve the right to introduce minor breaking changes prior
to releasing 1.0.
We will make every effort to avoid breaking changes once a library reaches 1.0.
With that said, many packages in this project are automatically generated from
service specifications. From time to time these service specifications may
introduce breaking changes. We make reasonable efforts, and use tooling, to
detect such breaking changes. When we detect a breaking change we will bump the
major version (or minor version for packages still at 0.x).
We do not consider changes to swift-tools-version to be breaking changes.
We do not consider changes to our dependencies, or the package traits enabled in our dependencies, to be breaking changes. You should add any dependencies to your application directly, and enable any non-default package traits of these dependencies explicitly.
This project follows Google's OSS Library Breaking Change Policy.
Our public API consists of the library products declared in each package's
Package.swift and their exported public and open symbols. Symbols prefixed
with _, annotated with @_spi(GoogleCloudInternal), or residing in
non-exported targets are internal implementation details and may change without
notice.
For full details and consumer guidelines, see the Public API Policy.
Contributions to this library are always welcome and highly encouraged.
See CONTRIBUTING for more information on how to get started. You may also find the Set Up Development Environment guide useful.
Apache 2.0 - See LICENSE for more information.
252 followers · starred Jul 2026
390 followers · starred Jul 2026
122 followers · starred Jul 2026
292 followers · starred Jul 2026
Swift
100.0%
Idiomatic Swift client libraries for Google Cloud Platform services.
The following example demonstrates creating a bucket using StorageControlClient
from GoogleCloudStorage:
import GoogleCloudStorage
public func quickstart(
client: StorageControlClient, projectId: String, bucketId: String
) async throws {
let bucket =
try await client
.createBucket(
request: .init().with {
$0.parent = "projects/_"
$0.bucketId = bucketId
$0.bucket = .init().with { bucket in
bucket.project = "projects/\(projectId)"
bucket.storageClass = "STANDARD"
bucket.location = "US"
}
})
print("successfully created bucket \(bucket)")
}
To add swift-google-cloud-storage to your project using Swift Package Manager:
swift package add-dependency https://github.com/googleapis/swift-google-cloud-storage.git --from 0.3.0
swift package add-target-dependency GoogleCloudStorage <target-name> --package swift-google-cloud-storage
For a step-by-step tutorial including authentication and project configuration, see the Getting Started Guide.
guide/): Local
DocC source files in this repository.We support and test the last 3 minor releases of Swift (currently Swift 6.2, 6.3, and 6.4). We periodically update the minimum supported version as new Swift versions become available.
Package.swift.Package.swift with platforms: [.macOS(.v15)].This project is in General Availability (GA) (as of the 0.4.0 release).
These 0.x releases are supported for production use and will receive fixes as
necessary, though we reserve the right to introduce minor breaking changes prior
to releasing 1.0.
We will make every effort to avoid breaking changes once a library reaches 1.0.
With that said, many packages in this project are automatically generated from
service specifications. From time to time these service specifications may
introduce breaking changes. We make reasonable efforts, and use tooling, to
detect such breaking changes. When we detect a breaking change we will bump the
major version (or minor version for packages still at 0.x).
We do not consider changes to swift-tools-version to be breaking changes.
We do not consider changes to our dependencies, or the package traits enabled in our dependencies, to be breaking changes. You should add any dependencies to your application directly, and enable any non-default package traits of these dependencies explicitly.
This project follows Google's OSS Library Breaking Change Policy.
Our public API consists of the library products declared in each package's
Package.swift and their exported public and open symbols. Symbols prefixed
with _, annotated with @_spi(GoogleCloudInternal), or residing in
non-exported targets are internal implementation details and may change without
notice.
For full details and consumer guidelines, see the Public API Policy.
Contributions to this library are always welcome and highly encouraged.
See CONTRIBUTING for more information on how to get started. You may also find the Set Up Development Environment guide useful.
Apache 2.0 - See LICENSE for more information.
252 followers · starred Jul 2026
390 followers · starred Jul 2026
122 followers · starred Jul 2026
292 followers · starred Jul 2026
Swift
100.0%