A Swift package to interact directly with Steam.

What's New




  • Login via password, 2FA, or shared login key
  • Receive basic info and friends list identifiers for the logged in user
  • Add/remove friends
  • Set friends list UI mode

💨 Steam

Swift Compatibility: 5.3 Platform Compatibility:

A Swift package to directly interact with Steam.

  • Login to a Steam account (via password or 2FA code)
  • Retrieve basic user info
    • Steam identifier
    • Account flags
    • Steam Community vanity profile URL
    • Friends list Steam identifiers & friend status
  • Add/remove friends


Swift Package Manager (Xcode):

  1. From the File menu, select Swift Packages › Add Package Dependency…
  2. Enter "" into the package repository URL text field

Swift Package Manager (standalone):

Add the following to the dependencies of your Package.swift file:

.package(url: "", .upToNextMinor(from: "0.1"))


  1. Choose a server from SteamServer.defaultServers or fetch the latest Steam server list using SteamServersFetcher.
  2. Instantiate a SteamService and connect to the chosen server (connect).
  3. login
  4. Receive user information and friends list, and use any functions that require user authentication (addFriend, removeFriend etc) as desired.


Several Steam Protobufs from SteamDatabase/Protobufs and their converted Swift models (via Swift Protobuf) are bundled with this library, as Swift packages do not currently support running scripts/custom build phase actions (which would ideally be used to clone the Protobufs repo and convert & copy the relevant files).

Related Libraries


  • Swift Tools 5.3.0
View More Packages from this Author


Last updated: Sat Mar 16 2024 18:53:01 GMT-0900 (Hawaii-Aleutian Daylight Time)