Swiftpack.co - robinlieb/apple-music-jwt as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by robinlieb.
robinlieb/apple-music-jwt 1.0.0
Library to generate JWT for Apple Music API.
⭐️ 0
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/robinlieb/apple-music-jwt.git", from: "1.0.0")

AppleMusicJWT

Library to generate JWT for Apple Music API.

Getting Started

Installation

Swift Package Manager

To include AppleMusicJWT into a Swift Package Manger project add the dependencies value in your Package.swift:

let package = Package(
    // name, platforms, products, etc.
    dependencies: [
        // other dependencies
        .package(url: "https://github.com/robinlieb/apple-music-jwt.git", from: "1.0.0"),
    ],
    targets: [
        .target(
            name: "YourProject",
            dependencies: [
                .product(name: "AppleMusicJWT", package: "apple-music-jwt"),
            ]),
    ]
)

Usage

You can use the AppleMusicJWT.generateToken(teamId:keyId:keyFileUrl:exp:) function to retrieve an optional String of the JWT.

import AppleMusicJWT

let token = AppleMusicJWT().generateToken(teamId: "1A2B3C4D5E", keyId: "5E4D3C2B1A", keyFileUrl: "path/to/file", exp: 60)

GitHub

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

Dependencies

Release Notes

Initial release.
2 years ago

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