Swiftpack.co - sebj/Steam as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by sebj.
sebj/Steam 0.1.0
A Swift package to interact directly with Steam.
⭐️ 15
🕓 2 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/sebj/Steam.git", from: "0.1.0")

💨 Steam

MIT License Build & Test

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

Installation

Swift Package Manager (Xcode):

  1. From the File menu, select Add Packages…
  2. Enter "https://github.com/sebj/steam" into the package repository URL text field

Swift Package Manager (standalone):

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

.package(url: "https://github.com/sebj/Steam.git", ...)

Usage

  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.

Protobufs

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, convert and copy the relevant files).

License

This library is released under the MIT license. See the LICENSE file for more information.

Related Libraries

GitHub

link
Stars: 15
Last commit: 8 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.1.0
2 years ago

🚀

  • 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

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics