/sonos-swift-sdk

Primary LanguageSwiftMIT LicenseMIT

Sonos Swift SDK

Swift SwiftLint License Platforms Swift Version Twitter

Sonos Swift SDK is a plug-and-play library that allows you to quickly integrate your iOS and macOS apps with the Sonos API.

How To Get Started

  • Create a Sonos Developer account here
  • Setup a new integration here
  • Open the SonosSDK.xcworkspace in Xcode.
  • Grab the Key Name, Key and Secret from your new Sonos app integration and update the SwiftUIExampleApp.swift file with your values:
struct SonosConfiguration {

    static let keyName = "your-sonos-key-name"
    static let key = "your-sonos-developer-key"
    static let secret = "your-sonos-developer-secret"
    static let redirectURI = "sonos-swift-sdk://authorize"
    static let callbackURL = "your-webhook-api-url"

}

Installation

Sonos Swift SDK supports the following installation methods:

Swift Package Manager

in Package.swift add the following:

dependencies: [
    .package(url: "https://github.com/JimmyJammed/sonos-swift-sdk", from: "1.0.0")
],
targets: [
    .target(
        name: "MyProject",
        dependencies: ["sonos-swift-sdk"]
    )
    ...
]
Note: Sonos Swift SDK requires the following Swift Package dependencies:

AFNetworking
BetterSafariView
Swinject
SwiftyJSON

Requirements

Sonos Swift SDK Version Sonos Swift Networking Version Minimum iOS Target Minimum macOS Target Minimum watchOS Target Minimum tvOS Target Notes
1.x v1 iOS 14 x x x Xcode 12+ is required.

Supported Sonos APIs

Here is a list of the supported Sonos API's in Sonos Swift SDK:

Unit Tests

Sonos Swift SDK includes a suite of unit tests within the Tests subdirectory.

Contribution Guide

A guide to submit issues, to ask general questions, or to open pull requests are here.

Credits

Sonos Swift SDK is an open source project and unaffiliated with Sonos Inc.

And most of all, thanks to Sonos Swift SDK's growing list of contributors.

License

Sonos Swift SDK is released under the MIT license. See LICENSE for details.