News Developer Tools

Google Cloud Swift SDK lets Swift apps call 100+ services

Google's new Swift libraries give server-side code native access to Cloud Storage, AI and IAM, and run on Linux and macOS.

Google has launched official Google Cloud client libraries for Swift, giving server-side Swift programs native access to Cloud Storage, AI, identity management and more than one hundred other Google Cloud services. Google says the SDK, called google-cloud-swift, is built for Swift 6.2 and later.

Google says the libraries use non-blocking networking through SwiftNIO, HTTP/2 and gRPC. Non-blocking means a server handles many requests without tying up a separate system thread for each connection. Google also points to Swift's compile-time checks for data races, which flag unsafe sharing of data between concurrent tasks in the editor.

Developers can build on macOS or Linux, using Xcode or Visual Studio Code. They can package programs as Linux containers and deploy them to Cloud Run, Google Kubernetes Engine or Compute Engine virtual machines. The SDK also targets command-line tools and automation scripts, which can sign in to Google Cloud through Application Default Credentials or Workload Identity Federation.

Google says the SDK does not belong inside iOS, iPadOS or visionOS apps, because embedding service account keys in a client app creates security risks. For those apps, Google points to the Firebase SDK for Apple Platforms or a backend API running on Cloud Run.

Source: Google Cloud announcement.