From aee8d905f5b6def05517466289345f8f827be75b Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Fri, 4 Aug 2017 09:17:07 -0700 Subject: [PATCH 1/2] feat: Use CommonCrypto in Xcode --- .gitmodules | 3 -- Cartfile | 1 - Cartfile.resolved | 1 - Carthage/Checkouts/CryptoSwift | 1 - JWT.xcodeproj/project.pbxproj | 85 ++++------------------------------ 5 files changed, 8 insertions(+), 83 deletions(-) delete mode 100644 .gitmodules delete mode 100644 Cartfile delete mode 100644 Cartfile.resolved delete mode 160000 Carthage/Checkouts/CryptoSwift diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 761522b..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "Carthage/Checkouts/CryptoSwift"] - path = Carthage/Checkouts/CryptoSwift - url = https://github.com/krzyzanowskim/CryptoSwift.git diff --git a/Cartfile b/Cartfile deleted file mode 100644 index 4f0cac5..0000000 --- a/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "krzyzanowskim/CryptoSwift" ~> 0.6.1 diff --git a/Cartfile.resolved b/Cartfile.resolved deleted file mode 100644 index 5b562e4..0000000 --- a/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "krzyzanowskim/CryptoSwift" "0.6.1" diff --git a/Carthage/Checkouts/CryptoSwift b/Carthage/Checkouts/CryptoSwift deleted file mode 160000 index 5f9bb95..0000000 --- a/Carthage/Checkouts/CryptoSwift +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5f9bb95c6f246c7e19bf4346a6ad1a0c406415f0 diff --git a/JWT.xcodeproj/project.pbxproj b/JWT.xcodeproj/project.pbxproj index eb97184..6fc3a21 100644 --- a/JWT.xcodeproj/project.pbxproj +++ b/JWT.xcodeproj/project.pbxproj @@ -11,13 +11,10 @@ 273011001F33EABA00219C35 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273010FE1F33EABA00219C35 /* HMAC.swift */; }; 273011011F33EABA00219C35 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273010FE1F33EABA00219C35 /* HMAC.swift */; }; 273011021F33EABA00219C35 /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273010FE1F33EABA00219C35 /* HMAC.swift */; }; - 2730110A1F33FC9100219C35 /* HMACCryptoSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011091F33FC9100219C35 /* HMACCryptoSwift.swift */; }; - 2730110B1F33FC9100219C35 /* HMACCryptoSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011091F33FC9100219C35 /* HMACCryptoSwift.swift */; }; - 2730110C1F33FC9100219C35 /* HMACCryptoSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011091F33FC9100219C35 /* HMACCryptoSwift.swift */; }; - 2730110D1F33FC9100219C35 /* HMACCryptoSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011091F33FC9100219C35 /* HMACCryptoSwift.swift */; }; - 2734C6A81D88001F00BFF9F1 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66725DAB1C59202E00FC32F4 /* CryptoSwift.framework */; }; - 2734C6A91D88002900BFF9F1 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66725DAB1C59202E00FC32F4 /* CryptoSwift.framework */; }; - 2734C6AA1D88003000BFF9F1 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66725DAB1C59202E00FC32F4 /* CryptoSwift.framework */; }; + 273011161F34029900219C35 /* HMACCommonCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */; }; + 273011171F34029900219C35 /* HMACCommonCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */; }; + 273011181F34029A00219C35 /* HMACCommonCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */; }; + 273011191F34029A00219C35 /* HMACCommonCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273011041F33FC5F00219C35 /* HMACCommonCrypto.swift */; }; 277794051DF221F800573F3E /* ClaimSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277794041DF221F800573F3E /* ClaimSet.swift */; }; 277794061DF221F800573F3E /* ClaimSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277794041DF221F800573F3E /* ClaimSet.swift */; }; 277794071DF221F800573F3E /* ClaimSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277794041DF221F800573F3E /* ClaimSet.swift */; }; @@ -52,7 +49,6 @@ CD9B623D1C7753FB005D4844 /* Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71151C469F010005C709 /* Decode.swift */; }; CD9B623E1C7753FB005D4844 /* Base64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520A71131C469F010005C709 /* Base64.swift */; }; CD9B62421C7753FB005D4844 /* JWT.h in Headers */ = {isa = PBXBuildFile; fileRef = 279D63A11AD07FFF0024E2BC /* JWT.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CD9B62891C7758BB005D4844 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66725DAB1C59202E00FC32F4 /* CryptoSwift.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -63,27 +59,6 @@ remoteGlobalIDString = 279D639B1AD07FFF0024E2BC; remoteInfo = JWT; }; - 66725DAA1C59202E00FC32F4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 66725DA21C59202E00FC32F4 /* CryptoSwift.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 754BE45519693E190098E6F3; - remoteInfo = "CryptoSwift iOS"; - }; - 66725DB21C59202E00FC32F4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 66725DA21C59202E00FC32F4 /* CryptoSwift.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 754BE46019693E190098E6F3; - remoteInfo = CryptoSwiftTests; - }; - CD9B628A1C7758CA005D4844 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 66725DA21C59202E00FC32F4 /* CryptoSwift.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 754BE45419693E190098E6F3; - remoteInfo = "CryptoSwift iOS"; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -105,7 +80,6 @@ 520A71161C469F010005C709 /* JWT.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JWT.swift; sourceTree = ""; }; 520A711B1C469F440005C709 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 540942F3614C41E3827F2013 /* Pods_JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 66725DA21C59202E00FC32F4 /* CryptoSwift.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CryptoSwift.xcodeproj; path = Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj; sourceTree = ""; }; CD9B62231C7753D8005D4844 /* JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CD9B62351C7753EC005D4844 /* JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CD9B62471C7753FB005D4844 /* JWT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JWT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -117,7 +91,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2734C6A81D88001F00BFF9F1 /* CryptoSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -133,7 +106,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CD9B62891C7758BB005D4844 /* CryptoSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -141,7 +113,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2734C6A91D88002900BFF9F1 /* CryptoSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -149,7 +120,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2734C6AA1D88003000BFF9F1 /* CryptoSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -159,7 +129,6 @@ 279D63921AD07FFF0024E2BC = { isa = PBXGroup; children = ( - 66725DA21C59202E00FC32F4 /* CryptoSwift.xcodeproj */, 520A711B1C469F440005C709 /* Package.swift */, 520A71121C469F010005C709 /* Sources */, 279D639E1AD07FFF0024E2BC /* Sources */, @@ -236,15 +205,6 @@ path = Sources; sourceTree = ""; }; - 66725DA31C59202E00FC32F4 /* Products */ = { - isa = PBXGroup; - children = ( - 66725DAB1C59202E00FC32F4 /* CryptoSwift.framework */, - 66725DB31C59202E00FC32F4 /* Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; AC8AE547FDAF3DD80EB4DB2F /* Frameworks */ = { isa = PBXGroup; children = ( @@ -340,7 +300,6 @@ buildRules = ( ); dependencies = ( - CD9B628B1C7758CA005D4844 /* PBXTargetDependency */, ); name = "JWT-iOS"; productName = JWT; @@ -412,12 +371,6 @@ mainGroup = 279D63921AD07FFF0024E2BC; productRefGroup = 279D639D1AD07FFF0024E2BC /* Products */; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 66725DA31C59202E00FC32F4 /* Products */; - ProjectRef = 66725DA21C59202E00FC32F4 /* CryptoSwift.xcodeproj */; - }, - ); projectRoot = ""; targets = ( 279D639B1AD07FFF0024E2BC /* JWT-OSX */, @@ -429,23 +382,6 @@ }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 66725DAB1C59202E00FC32F4 /* CryptoSwift.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = CryptoSwift.framework; - remoteRef = 66725DAA1C59202E00FC32F4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66725DB31C59202E00FC32F4 /* Tests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = Tests.xctest; - remoteRef = 66725DB21C59202E00FC32F4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ 279D63A51AD07FFF0024E2BC /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -489,6 +425,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 273011161F34029900219C35 /* HMACCommonCrypto.swift in Sources */, 520A71181C469F010005C709 /* Claims.swift in Sources */, 520A711A1C469F010005C709 /* JWT.swift in Sources */, 520A71191C469F010005C709 /* Decode.swift in Sources */, @@ -497,7 +434,6 @@ 277794051DF221F800573F3E /* ClaimSet.swift in Sources */, 273010FF1F33EABA00219C35 /* HMAC.swift in Sources */, 520A71171C469F010005C709 /* Base64.swift in Sources */, - 2730110A1F33FC9100219C35 /* HMACCryptoSwift.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -513,6 +449,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 273011171F34029900219C35 /* HMACCommonCrypto.swift in Sources */, CD9B62171C7753D8005D4844 /* Claims.swift in Sources */, CD9B62181C7753D8005D4844 /* JWT.swift in Sources */, CD9B62191C7753D8005D4844 /* Decode.swift in Sources */, @@ -521,7 +458,6 @@ 277794061DF221F800573F3E /* ClaimSet.swift in Sources */, 273011001F33EABA00219C35 /* HMAC.swift in Sources */, CD9B621A1C7753D8005D4844 /* Base64.swift in Sources */, - 2730110B1F33FC9100219C35 /* HMACCryptoSwift.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -529,6 +465,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 273011181F34029A00219C35 /* HMACCommonCrypto.swift in Sources */, CD9B62291C7753EC005D4844 /* Claims.swift in Sources */, CD9B622A1C7753EC005D4844 /* JWT.swift in Sources */, CD9B622B1C7753EC005D4844 /* Decode.swift in Sources */, @@ -537,7 +474,6 @@ 277794071DF221F800573F3E /* ClaimSet.swift in Sources */, 273011011F33EABA00219C35 /* HMAC.swift in Sources */, CD9B622C1C7753EC005D4844 /* Base64.swift in Sources */, - 2730110C1F33FC9100219C35 /* HMACCryptoSwift.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -545,6 +481,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 273011191F34029A00219C35 /* HMACCommonCrypto.swift in Sources */, CD9B623B1C7753FB005D4844 /* Claims.swift in Sources */, CD9B623C1C7753FB005D4844 /* JWT.swift in Sources */, CD9B623D1C7753FB005D4844 /* Decode.swift in Sources */, @@ -553,7 +490,6 @@ 277794081DF221F800573F3E /* ClaimSet.swift in Sources */, 273011021F33EABA00219C35 /* HMAC.swift in Sources */, CD9B623E1C7753FB005D4844 /* Base64.swift in Sources */, - 2730110D1F33FC9100219C35 /* HMACCryptoSwift.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -565,11 +501,6 @@ target = 279D639B1AD07FFF0024E2BC /* JWT-OSX */; targetProxy = 279D63A91AD07FFF0024E2BC /* PBXContainerItemProxy */; }; - CD9B628B1C7758CA005D4844 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "CryptoSwift iOS"; - targetProxy = CD9B628A1C7758CA005D4844 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ From 9b7463fa6485f2e708049cc058d9571486b51c0a Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Fri, 4 Aug 2017 11:41:47 -0700 Subject: [PATCH 2/2] fix: Allow Xcode to find CommonCrypto --- JWT.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/JWT.xcodeproj/project.pbxproj b/JWT.xcodeproj/project.pbxproj index 6fc3a21..b2cc594 100644 --- a/JWT.xcodeproj/project.pbxproj +++ b/JWT.xcodeproj/project.pbxproj @@ -547,6 +547,7 @@ ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = macosx; + SWIFT_INCLUDE_PATHS = "$(SRCROOT)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; VERSIONING_SYSTEM = "apple-generic"; @@ -590,6 +591,7 @@ MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = macosx; + SWIFT_INCLUDE_PATHS = "$(SRCROOT)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; VERSIONING_SYSTEM = "apple-generic";