Skip to content

Commit

Permalink
Swift Package Manager Integration
Browse files Browse the repository at this point in the history
Added Package.swift with CryptoSwift dependency and moved code to
Sources folder so the project can be used with Swift Package Manager.
  • Loading branch information
jjb3rd committed Jan 15, 2016
1 parent ae27dd3 commit 25a04f7
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 22 deletions.
6 changes: 3 additions & 3 deletions JSONWebToken.podspec
@@ -1,16 +1,16 @@
Pod::Spec.new do |spec|
spec.name = 'JSONWebToken'
spec.version = '1.4.1'
spec.version = '1.4.2'
spec.summary = 'Swift library for JSON Web Tokens (JWT).'
spec.homepage = 'https://github.com/kylef/JSONWebToken.swift'
spec.license = { :type => 'BSD', :file => 'LICENSE' }
spec.author = { 'Kyle Fuller' => 'kyle@fuller.li' }
spec.social_media_url = 'http://twitter.com/kylefuller'
spec.source = { :git => 'https://github.com/kylef/JSONWebToken.swift.git', :tag => "#{spec.version}" }
spec.source_files = 'JWT/*.swift'
spec.source_files = 'Sources/*.swift'
spec.ios.deployment_target = '8.0'
spec.osx.deployment_target = '10.9'
spec.requires_arc = true
spec.dependency 'CryptoSwift', '0.1.1'
spec.dependency 'CryptoSwift', '0.2.2'
spec.module_name = 'JWT'
end
42 changes: 26 additions & 16 deletions JWT.xcodeproj/project.pbxproj
Expand Up @@ -10,10 +10,10 @@
279D63A21AD07FFF0024E2BC /* JWT.h in Headers */ = {isa = PBXBuildFile; fileRef = 279D63A11AD07FFF0024E2BC /* JWT.h */; settings = {ATTRIBUTES = (Public, ); }; };
279D63A81AD07FFF0024E2BC /* JWT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 279D639C1AD07FFF0024E2BC /* JWT.framework */; };
279D63AF1AD07FFF0024E2BC /* JWTTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279D63AE1AD07FFF0024E2BC /* JWTTests.swift */; };
279D63B91AD0803F0024E2BC /* JWT.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279D63B81AD0803F0024E2BC /* JWT.swift */; };
279D63BB1AD0E3FA0024E2BC /* Claims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279D63BA1AD0E3FA0024E2BC /* Claims.swift */; };
279D63BD1AD0ED750024E2BC /* Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279D63BC1AD0ED750024E2BC /* Decode.swift */; };
279D63BF1AD0EDC00024E2BC /* Base64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279D63BE1AD0EDC00024E2BC /* Base64.swift */; };
520A71171C469F010005C709 /* Base64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71131C469F010005C709 /* Base64.swift */; };
520A71181C469F010005C709 /* Claims.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71141C469F010005C709 /* Claims.swift */; };
520A71191C469F010005C709 /* Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71151C469F010005C709 /* Decode.swift */; };
520A711A1C469F010005C709 /* JWT.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71161C469F010005C709 /* JWT.swift */; };
885619E9E1C342A9D8BD77B7 /* Pods_JWT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 540942F3614C41E3827F2013 /* Pods_JWT.framework */; };
EBEC5851F5183DF2D7BFE1AF /* Pods_JWTTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE8198B6E30BA6B8F8125FA7 /* Pods_JWTTests.framework */; };
/* End PBXBuildFile section */
Expand All @@ -35,11 +35,12 @@
279D63A71AD07FFF0024E2BC /* JWTTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JWTTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
279D63AD1AD07FFF0024E2BC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
279D63AE1AD07FFF0024E2BC /* JWTTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JWTTests.swift; sourceTree = "<group>"; };
279D63B81AD0803F0024E2BC /* JWT.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWT.swift; sourceTree = "<group>"; };
279D63BA1AD0E3FA0024E2BC /* Claims.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Claims.swift; sourceTree = "<group>"; };
279D63BC1AD0ED750024E2BC /* Decode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Decode.swift; sourceTree = "<group>"; };
279D63BE1AD0EDC00024E2BC /* Base64.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Base64.swift; sourceTree = "<group>"; };
3BD8D638895FE8AF4FDDA8A9 /* Pods-JWTTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JWTTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JWTTests/Pods-JWTTests.debug.xcconfig"; sourceTree = "<group>"; };
520A71131C469F010005C709 /* Base64.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Base64.swift; sourceTree = "<group>"; };
520A71141C469F010005C709 /* Claims.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Claims.swift; sourceTree = "<group>"; };
520A71151C469F010005C709 /* Decode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Decode.swift; sourceTree = "<group>"; };
520A71161C469F010005C709 /* JWT.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWT.swift; sourceTree = "<group>"; };
520A711B1C469F440005C709 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
540942F3614C41E3827F2013 /* Pods_JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; };
56671E3EAC540766DE31974E /* Pods-JWT.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JWT.release.xcconfig"; path = "Pods/Target Support Files/Pods-JWT/Pods-JWT.release.xcconfig"; sourceTree = "<group>"; };
85B0E9B465B3B29391C19D14 /* Pods-JWTTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JWTTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-JWTTests/Pods-JWTTests.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -71,6 +72,8 @@
279D63921AD07FFF0024E2BC = {
isa = PBXGroup;
children = (
520A711B1C469F440005C709 /* Package.swift */,
520A71121C469F010005C709 /* Sources */,
279D639E1AD07FFF0024E2BC /* JWT */,
279D63AB1AD07FFF0024E2BC /* JWTTests */,
279D639D1AD07FFF0024E2BC /* Products */,
Expand All @@ -94,10 +97,6 @@
isa = PBXGroup;
children = (
279D63A11AD07FFF0024E2BC /* JWT.h */,
279D63B81AD0803F0024E2BC /* JWT.swift */,
279D63BC1AD0ED750024E2BC /* Decode.swift */,
279D63BE1AD0EDC00024E2BC /* Base64.swift */,
279D63BA1AD0E3FA0024E2BC /* Claims.swift */,
279D639F1AD07FFF0024E2BC /* Supporting Files */,
);
path = JWT;
Expand Down Expand Up @@ -139,6 +138,17 @@
name = Pods;
sourceTree = "<group>";
};
520A71121C469F010005C709 /* Sources */ = {
isa = PBXGroup;
children = (
520A71131C469F010005C709 /* Base64.swift */,
520A71141C469F010005C709 /* Claims.swift */,
520A71151C469F010005C709 /* Decode.swift */,
520A71161C469F010005C709 /* JWT.swift */,
);
path = Sources;
sourceTree = "<group>";
};
AC8AE547FDAF3DD80EB4DB2F /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -340,10 +350,10 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
279D63BF1AD0EDC00024E2BC /* Base64.swift in Sources */,
279D63BB1AD0E3FA0024E2BC /* Claims.swift in Sources */,
279D63BD1AD0ED750024E2BC /* Decode.swift in Sources */,
279D63B91AD0803F0024E2BC /* JWT.swift in Sources */,
520A71181C469F010005C709 /* Claims.swift in Sources */,
520A711A1C469F010005C709 /* JWT.swift in Sources */,
520A71191C469F010005C709 /* Decode.swift in Sources */,
520A71171C469F010005C709 /* Base64.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
8 changes: 8 additions & 0 deletions Package.swift
@@ -0,0 +1,8 @@
import PackageDescription

let package = Package(
name: "JWT",
dependencies: [
.Package(url: "https://github.com/krzyzanowskim/CryptoSwift", versions: Version(0,2,2)..<Version(0,3,0))
]
)
6 changes: 3 additions & 3 deletions Podfile.lock
@@ -1,10 +1,10 @@
PODS:
- CryptoSwift (0.1.1)
- CryptoSwift (0.2.2)

DEPENDENCIES:
- CryptoSwift (= 0.1.1)
- CryptoSwift (= 0.2.2)

SPEC CHECKSUMS:
CryptoSwift: c11640d3d66107efc8333e4131a5173f072b1d61
CryptoSwift: d382228d6301c09474132417878a741c2a2e68cd

COCOAPODS: 0.39.0
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -12,6 +12,20 @@ Swift implementation of [JSON Web Token](https://tools.ietf.org/html/draft-ietf-
pod 'JSONWebToken'
```

[Swift Package Manager](https://swift.org/package-manager/) installation is also available with the following dependency:

```swift
import PackageDescription

let package = Package(
name: "AwesomeProject",
dependencies: [
.Package(url: "https://github.com/kylef/JSONWebToken.swift", versions: Version(1,4,2)..<Version(1,5,0))
]
)

```

## Usage

```swift
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 25a04f7

Please sign in to comment.