Sonos Swift SDK is a plug-and-play library that allows you to quickly integrate your iOS and macOS apps with the Sonos API.
- 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"
}
Sonos Swift SDK supports the following installation methods:
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"]
)
...
]
AFNetworking
BetterSafariView
Swinject
SwiftyJSON
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. |
Here is a list of the supported Sonos API's in Sonos Swift SDK:
Sonos Swift SDK includes a suite of unit tests within the Tests subdirectory.
A guide to submit issues, to ask general questions, or to open pull requests are here.
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.
Sonos Swift SDK is released under the MIT license. See LICENSE for details.