Latest 0.9.0
Homepage https://github.com/scottrhoyt/Cider
License MIT
Platforms ios 11.0
Authors

The Missing Apple Music SDK. Written in Swift.

Build Status
codecov.io
Carthage compatible
CocoaPods
SPM compatible
Platform iOS
Language Swift 4.0

Installation

Carthage

Add the following to your Cartfile:

github "scottrhoyt/Cider" ~> 0.9

CocoaPods

Add the following to your Podfile:

pod 'Cider', '~> 0.9'

SPM

Add to your Package.swift file like so:

import PackageDescription

let package = Package(
    name: "<YOUR_PROJECT_NAME>",
    dependencies: [
        .package(url: "https://github.com/scottrhoyt/Cider.git", from: "0.9.0")
    ]
)

Usage

Developer Token

To use the Apple Music API, you will need to generate a developer token.
Instructions for how to do this can be found in the Apple Music API
reference.

Once you have an Apple Music Key you can use a 3rd party library/tool to
generate your token. I created a Node.js library and CLI tool that you can find
here.

Create a Client

let developerToken = "<developer_token>"
let cider = CiderClient(storefront: .unitedStates, developerToken: developerToken)

Search the Catalog

cider.search(term: "Michael Jackson", types: [.albums, .songs]) { results, error in
  // Process the results or error
}

Lookup an Artist/Album/Song

let songId = "<song_id>"
cider.song(id: songId) { result, error in
  // Process the results or error
}

API Reference

The full API reference can be found here.

License

MIT

Latest podspec

{
    "name": "Cider",
    "version": "0.9.0",
    "summary": "The missing Apple Music SDK. Written in Swift.",
    "description": "Cider is an SDK for interacting with the Apple Music API. It can help younquickly search the catalog; retrive albums, artists, and songs; accessnthe user's playback history and recommendations; and more.",
    "homepage": "https://github.com/scottrhoyt/Cider",
    "documentation_url": "http://scottrhoyt.github.io/Cider/",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Scott Hoyt": "[email protected]"
    },
    "social_media_url": "http://twitter.com/scotthoyt",
    "platforms": {
        "ios": "11.0"
    },
    "source": {
        "git": "https://github.com/scottrhoyt/Cider.git",
        "tag": "0.9.0"
    },
    "source_files": "Sources/Cider/**/*.swift",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This