Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Added SPM support #17

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version:5.0
import PackageDescription

let package = Package(
name: "CupertinoJWT",
platforms: [
.macOS(.v10_12),
.iOS(.v10),
.tvOS(.v10),
.watchOS(.v3)
],
products: [
.library(
name: "CupertinoJWT",
targets: ["CupertinoJWT"]),
],
dependencies: [],
targets: [
.target(
name: "CupertinoJWT",
dependencies: [],
path: "Sources"),
.testTarget(
name: "CupertinoJWTTests",
dependencies: ["CupertinoJWT"]),
],
swiftLanguageVersions: [.v5]
)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ github "ethanhuang13/CupertinoJWT"
[Carthage Installation]: https://github.com/Carthage/Carthage#installing-carthage
[Carthage Usage]: https://github.com/Carthage/Carthage#adding-frameworks-to-an-application

### SPM

When using Xcode 11 you can install `CupertinoJWT` by going to your Project settings > `Swift Packages` and add the repository by providing the GitHub URL. Or go to `File` > `Swift Packages` > `Add Package Dependencies...`

## What's this all about?

Apple has several server APIs uses JSON Web Token([JWT](https://jwt.io)) as authentication method, including [Apple Push Notification service (APNs)](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1), [MusicKit](https://help.apple.com/developer-account/#/devce5522674), [DeviceCheck](https://help.apple.com/developer-account/#/devc3cc013b7) and [App Store Connect API](https://developer.apple.com/videos/play/wwdc2018/303/). Probably more in the future.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ hMdWYrKn
XCTFail(error.localizedDescription)
}
}

static var allTests : [(String, (MemoryCacheTests) -> () throws -> Void)] {
return [
("testJWT", testJWT),
]
}
}
22 changes: 0 additions & 22 deletions Tests/Info.plist

This file was deleted.

6 changes: 6 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import XCTest
@testable import CupertinoJWTTests

XCTMain([
testCase(CupertinoJWTTests.allTests),
])