From f18bacc279721e507aac9b7149ef738eb729ea8e Mon Sep 17 00:00:00 2001 From: Shambhavi Punja Date: Mon, 28 Jan 2019 10:39:23 -0800 Subject: [PATCH 1/5] updated project targets to swift4.2 --- Heimdallr.xcodeproj/project.pbxproj | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Heimdallr.xcodeproj/project.pbxproj b/Heimdallr.xcodeproj/project.pbxproj index 8d1ab1b..0aecf2c 100644 --- a/Heimdallr.xcodeproj/project.pbxproj +++ b/Heimdallr.xcodeproj/project.pbxproj @@ -506,11 +506,11 @@ TargetAttributes = { DC545DC11A89F0F10051A575 = { CreatedOnToolsVersion = 6.1.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; }; DC545DCC1A89F0F10051A575 = { CreatedOnToolsVersion = 6.1.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; }; DC582F421BE1319F0017BE06 = { @@ -738,7 +738,8 @@ DYLIB_CURRENT_VERSION = 1; INFOPLIST_FILE = "Heimdallr/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -753,7 +754,8 @@ DYLIB_CURRENT_VERSION = 1; INFOPLIST_FILE = "Heimdallr/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -765,7 +767,8 @@ INFOPLIST_FILE = "HeimdallrTests/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = HeimdallrTests; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -777,7 +780,8 @@ INFOPLIST_FILE = "HeimdallrTests/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = HeimdallrTests; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -790,7 +794,7 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Heimdallr/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -803,7 +807,7 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Heimdallr/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -814,7 +818,7 @@ INFOPLIST_FILE = "HeimdallrTests/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_NAME = HeimdallrTests; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -825,7 +829,7 @@ INFOPLIST_FILE = "HeimdallrTests/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_NAME = HeimdallrTests; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Release; }; From 3b88e9e0208d31e01b921dbe55fb69defce11aef Mon Sep 17 00:00:00 2001 From: Shambhavi Punja Date: Mon, 28 Jan 2019 10:41:09 -0800 Subject: [PATCH 2/5] updated project libraries --- Cartfile | 2 +- Cartfile.resolved | 8 ++++---- Carthage/Checkouts/Nimble | 2 +- Carthage/Checkouts/OHHTTPStubs | 2 +- Carthage/Checkouts/Quick | 2 +- Carthage/Checkouts/Result | 2 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ 7 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 Heimdallr.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Cartfile b/Cartfile index 23534fa..67da3fe 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ # Core -github "antitypical/Result" ~> 3.2 +github "antitypical/Result" ~> 4.1.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 1c00b6e..6d49938 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ -github "AliSoftware/OHHTTPStubs" "6.0.0" -github "Quick/Nimble" "v7.0.2" -github "Quick/Quick" "v1.2.0" -github "antitypical/Result" "3.2.4" +github "AliSoftware/OHHTTPStubs" "6.1.0" +github "Quick/Nimble" "v7.3.2" +github "Quick/Quick" "v1.3.2" +github "antitypical/Result" "4.1.0" github "jspahrsummers/xcconfigs" "0.11" diff --git a/Carthage/Checkouts/Nimble b/Carthage/Checkouts/Nimble index 38c9ab0..df937ff 160000 --- a/Carthage/Checkouts/Nimble +++ b/Carthage/Checkouts/Nimble @@ -1 +1 @@ -Subproject commit 38c9ab0846a3fbec308eb2aa9ef68b10a7434eb4 +Subproject commit df937ffd185b3dd1a44e0c234121cf826b599eb4 diff --git a/Carthage/Checkouts/OHHTTPStubs b/Carthage/Checkouts/OHHTTPStubs index f90c2bb..c088cfa 160000 --- a/Carthage/Checkouts/OHHTTPStubs +++ b/Carthage/Checkouts/OHHTTPStubs @@ -1 +1 @@ -Subproject commit f90c2bb0fb882e43761ab963ca8869d349d2c6e3 +Subproject commit c088cfa9b46fa9cafada8c008b63903f1b719486 diff --git a/Carthage/Checkouts/Quick b/Carthage/Checkouts/Quick index 0ff81f2..5fbf138 160000 --- a/Carthage/Checkouts/Quick +++ b/Carthage/Checkouts/Quick @@ -1 +1 @@ -Subproject commit 0ff81f2c665b4381f526bd656f8708dd52a9ea2f +Subproject commit 5fbf13871d185526993130c3a1fad0b70bfe37ce diff --git a/Carthage/Checkouts/Result b/Carthage/Checkouts/Result index 7477584..2ca499b 160000 --- a/Carthage/Checkouts/Result +++ b/Carthage/Checkouts/Result @@ -1 +1 @@ -Subproject commit 7477584259bfce2560a19e06ad9f71db441fff11 +Subproject commit 2ca499ba456795616fbc471561ff1d963e6ae160 diff --git a/Heimdallr.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Heimdallr.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Heimdallr.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + From 43531ea79f534cde55997acf93b853fdead98079 Mon Sep 17 00:00:00 2001 From: Shambhavi Punja Date: Mon, 28 Jan 2019 10:41:52 -0800 Subject: [PATCH 3/5] updated podspec dependencies --- Heimdallr.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Heimdallr.podspec b/Heimdallr.podspec index b1bad6a..cb0caa7 100644 --- a/Heimdallr.podspec +++ b/Heimdallr.podspec @@ -23,9 +23,9 @@ Pod::Spec.new do |spec| spec.default_subspec = 'Core' spec.subspec 'Core' do |subspec| - subspec.dependency 'Result', '~> 3.0' + subspec.dependency 'Result', '~> 4.1.0' subspec.framework = 'Foundation' - subspec.source_files = 'Heimdallr/Core/*.swift' + subspec.source_files = 'Heimdallr/*.swift' end end From b289d470bda1b5f2d7a7c52670139bdd6af3d25e Mon Sep 17 00:00:00 2001 From: Shambhavi Punja Date: Mon, 28 Jan 2019 13:26:29 -0800 Subject: [PATCH 4/5] updated version number --- Heimdallr.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Heimdallr.podspec b/Heimdallr.podspec index cb0caa7..9fc360a 100644 --- a/Heimdallr.podspec +++ b/Heimdallr.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Heimdallr' - spec.version = '3.6.1' + spec.version = '3.6.2' spec.authors = { 'trivago' => 'info@trivago.de' } From 70d3d00556f11a790624f304d9fff715aa7441a7 Mon Sep 17 00:00:00 2001 From: Ferran Poveda Date: Sat, 20 Apr 2019 12:00:54 -0700 Subject: [PATCH 5/5] update to swift 5 + update all dependencies --- Cartfile.private | 8 +- Cartfile.resolved | 8 +- Carthage/Checkouts/Nimble | 2 +- Carthage/Checkouts/OHHTTPStubs | 2 +- Carthage/Checkouts/Quick | 2 +- Carthage/Checkouts/xcconfigs | 2 +- Heimdallr.podspec | 4 +- Heimdallr.xcodeproj/project.pbxproj | 97 +++++++++++-------- Heimdallr/OAuthAccessToken.swift | 1 + Heimdallr/OAuthAccessTokenKeychainStore.swift | 1 + Heimdallr/OAuthError.swift | 7 +- Heimdallr/Supporting Files/Info.plist | 2 +- Heimdallr/URLRequestExtensions.swift | 8 +- 13 files changed, 84 insertions(+), 60 deletions(-) diff --git a/Cartfile.private b/Cartfile.private index 940d0bd..4e756a0 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,8 +1,8 @@ -github "jspahrsummers/xcconfigs" ~> 0.11 -github "AliSoftware/OHHTTPStubs" ~> 6.0 +github "jspahrsummers/xcconfigs" ~> 1.0 +github "AliSoftware/OHHTTPStubs" ~> 7.0 # Specifications -github "Quick/Quick" ~> 1.1.0 +github "Quick/Quick" ~> 2.1.0 # Matchers -github "Quick/Nimble" ~> 7.0.0 +github "Quick/Nimble" ~> 8.0.1 diff --git a/Cartfile.resolved b/Cartfile.resolved index 6d49938..538dfa3 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ -github "AliSoftware/OHHTTPStubs" "6.1.0" -github "Quick/Nimble" "v7.3.2" -github "Quick/Quick" "v1.3.2" +github "AliSoftware/OHHTTPStubs" "7.0.0" +github "Quick/Nimble" "v8.0.1" +github "Quick/Quick" "v2.1.0" github "antitypical/Result" "4.1.0" -github "jspahrsummers/xcconfigs" "0.11" +github "jspahrsummers/xcconfigs" "1.0" diff --git a/Carthage/Checkouts/Nimble b/Carthage/Checkouts/Nimble index df937ff..43304bf 160000 --- a/Carthage/Checkouts/Nimble +++ b/Carthage/Checkouts/Nimble @@ -1 +1 @@ -Subproject commit df937ffd185b3dd1a44e0c234121cf826b599eb4 +Subproject commit 43304bf2b1579fd555f2fdd51742771c1e4f2b98 diff --git a/Carthage/Checkouts/OHHTTPStubs b/Carthage/Checkouts/OHHTTPStubs index c088cfa..5431829 160000 --- a/Carthage/Checkouts/OHHTTPStubs +++ b/Carthage/Checkouts/OHHTTPStubs @@ -1 +1 @@ -Subproject commit c088cfa9b46fa9cafada8c008b63903f1b719486 +Subproject commit 543182991a0d59db81f5b835a40901a9a386847d diff --git a/Carthage/Checkouts/Quick b/Carthage/Checkouts/Quick index 5fbf138..94df9b4 160000 --- a/Carthage/Checkouts/Quick +++ b/Carthage/Checkouts/Quick @@ -1 +1 @@ -Subproject commit 5fbf13871d185526993130c3a1fad0b70bfe37ce +Subproject commit 94df9b449508344667e5afc7e80f8bcbff1e4c37 diff --git a/Carthage/Checkouts/xcconfigs b/Carthage/Checkouts/xcconfigs index 40f9bcc..d0f8992 160000 --- a/Carthage/Checkouts/xcconfigs +++ b/Carthage/Checkouts/xcconfigs @@ -1 +1 @@ -Subproject commit 40f9bcc63752cdd95deee267d2fbf9da09a9f6f2 +Subproject commit d0f8992afad45262cfe3a3cf512e7127fdcf296c diff --git a/Heimdallr.podspec b/Heimdallr.podspec index 9fc360a..50b1bc5 100644 --- a/Heimdallr.podspec +++ b/Heimdallr.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Heimdallr' - spec.version = '3.6.2' + spec.version = '3.7.0' spec.authors = { 'trivago' => 'info@trivago.de' } @@ -18,7 +18,7 @@ Pod::Spec.new do |spec| spec.description = 'Heimdallr is an OAuth 2.0 client specifically designed for easy usage. It currently supports the resource owner password credentials grant flow, refreshing an access token as well as extension grants.' spec.ios.deployment_target = '9.0' - spec.osx.deployment_target = '10.9' + spec.osx.deployment_target = '10.10' spec.default_subspec = 'Core' diff --git a/Heimdallr.xcodeproj/project.pbxproj b/Heimdallr.xcodeproj/project.pbxproj index 0aecf2c..dd05c82 100644 --- a/Heimdallr.xcodeproj/project.pbxproj +++ b/Heimdallr.xcodeproj/project.pbxproj @@ -93,6 +93,18 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 4589DE79226B996D00A03FFA /* macOS-Application.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "macOS-Application.xcconfig"; sourceTree = ""; }; + 4589DE7A226B996D00A03FFA /* macOS-Framework.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "macOS-Framework.xcconfig"; sourceTree = ""; }; + 4589DE7B226B996D00A03FFA /* macOS-StaticLibrary.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "macOS-StaticLibrary.xcconfig"; sourceTree = ""; }; + 4589DE7C226B996D00A03FFA /* macOS-Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "macOS-Base.xcconfig"; sourceTree = ""; }; + 4589DE7D226B996D00A03FFA /* macOS-XCTest.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "macOS-XCTest.xcconfig"; sourceTree = ""; }; + 4589DE7E226B996D00A03FFA /* macOS-DynamicLibrary.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "macOS-DynamicLibrary.xcconfig"; sourceTree = ""; }; + 4589DE80226B996D00A03FFA /* Mac-XCTest.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Mac-XCTest.xcconfig"; sourceTree = ""; }; + 4589DE81226B996D00A03FFA /* Mac-StaticLibrary.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Mac-StaticLibrary.xcconfig"; sourceTree = ""; }; + 4589DE82226B996D00A03FFA /* Mac-Framework.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Mac-Framework.xcconfig"; sourceTree = ""; }; + 4589DE83226B996D00A03FFA /* Mac-Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Mac-Base.xcconfig"; sourceTree = ""; }; + 4589DE84226B996D00A03FFA /* Mac-Application.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Mac-Application.xcconfig"; sourceTree = ""; }; + 4589DE85226B996D00A03FFA /* Mac-DynamicLibrary.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Mac-DynamicLibrary.xcconfig"; sourceTree = ""; }; D44F76361DA52BDB002A4AC4 /* ReactiveSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveSwift.framework; path = Carthage/Checkouts/ReactiveSwift/build/Debug/ReactiveSwift.framework; sourceTree = ""; }; D44F76381DA52BEA002A4AC4 /* ReactiveSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveSwift.framework; path = "../../Library/Developer/Xcode/DerivedData/Heimdallr-fdtctotgikuwtugzxtbbivybhrkn/Build/Products/Debug-iphonesimulator/ReactiveSwift.framework"; sourceTree = ""; }; DC209CC51C845F1900C43C75 /* Argo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Argo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -145,11 +157,6 @@ DC712A4B1C85AD77009860A5 /* iOS-Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-Base.xcconfig"; sourceTree = ""; }; DC712A4C1C85AD77009860A5 /* iOS-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-Framework.xcconfig"; sourceTree = ""; }; DC712A4D1C85AD77009860A5 /* iOS-StaticLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-StaticLibrary.xcconfig"; sourceTree = ""; }; - DC712A4F1C85AD77009860A5 /* Mac-Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-Application.xcconfig"; sourceTree = ""; }; - DC712A501C85AD77009860A5 /* Mac-Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-Base.xcconfig"; sourceTree = ""; }; - DC712A511C85AD77009860A5 /* Mac-DynamicLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-DynamicLibrary.xcconfig"; sourceTree = ""; }; - DC712A521C85AD77009860A5 /* Mac-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-Framework.xcconfig"; sourceTree = ""; }; - DC712A531C85AD77009860A5 /* Mac-StaticLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-StaticLibrary.xcconfig"; sourceTree = ""; }; DC712A561C85AD77009860A5 /* tvOS-Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "tvOS-Application.xcconfig"; sourceTree = ""; }; DC712A571C85AD77009860A5 /* tvOS-Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "tvOS-Base.xcconfig"; sourceTree = ""; }; DC712A581C85AD77009860A5 /* tvOS-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "tvOS-Framework.xcconfig"; sourceTree = ""; }; @@ -204,6 +211,34 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 4589DE78226B996D00A03FFA /* macOS */ = { + isa = PBXGroup; + children = ( + 4589DE79226B996D00A03FFA /* macOS-Application.xcconfig */, + 4589DE7A226B996D00A03FFA /* macOS-Framework.xcconfig */, + 4589DE7B226B996D00A03FFA /* macOS-StaticLibrary.xcconfig */, + 4589DE7C226B996D00A03FFA /* macOS-Base.xcconfig */, + 4589DE7D226B996D00A03FFA /* macOS-XCTest.xcconfig */, + 4589DE7E226B996D00A03FFA /* macOS-DynamicLibrary.xcconfig */, + ); + name = macOS; + path = Carthage/Checkouts/xcconfigs/macOS; + sourceTree = SOURCE_ROOT; + }; + 4589DE7F226B996D00A03FFA /* Mac OS X */ = { + isa = PBXGroup; + children = ( + 4589DE80226B996D00A03FFA /* Mac-XCTest.xcconfig */, + 4589DE81226B996D00A03FFA /* Mac-StaticLibrary.xcconfig */, + 4589DE82226B996D00A03FFA /* Mac-Framework.xcconfig */, + 4589DE83226B996D00A03FFA /* Mac-Base.xcconfig */, + 4589DE84226B996D00A03FFA /* Mac-Application.xcconfig */, + 4589DE85226B996D00A03FFA /* Mac-DynamicLibrary.xcconfig */, + ); + name = "Mac OS X"; + path = "Carthage/Checkouts/xcconfigs/Mac OS X"; + sourceTree = SOURCE_ROOT; + }; DC209CCC1C845F2000C43C75 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -314,7 +349,8 @@ children = ( DC712A3E1C85AD77009860A5 /* Base */, DC712A491C85AD77009860A5 /* iOS */, - DC712A4E1C85AD77009860A5 /* Mac OS X */, + 4589DE7F226B996D00A03FFA /* Mac OS X */, + 4589DE78226B996D00A03FFA /* macOS */, DC712A551C85AD77009860A5 /* tvOS */, DC712A5A1C85AD77009860A5 /* watchOS */, ); @@ -364,18 +400,6 @@ path = iOS; sourceTree = ""; }; - DC712A4E1C85AD77009860A5 /* Mac OS X */ = { - isa = PBXGroup; - children = ( - DC712A4F1C85AD77009860A5 /* Mac-Application.xcconfig */, - DC712A501C85AD77009860A5 /* Mac-Base.xcconfig */, - DC712A511C85AD77009860A5 /* Mac-DynamicLibrary.xcconfig */, - DC712A521C85AD77009860A5 /* Mac-Framework.xcconfig */, - DC712A531C85AD77009860A5 /* Mac-StaticLibrary.xcconfig */, - ); - path = "Mac OS X"; - sourceTree = ""; - }; DC712A551C85AD77009860A5 /* tvOS */ = { isa = PBXGroup; children = ( @@ -506,11 +530,11 @@ TargetAttributes = { DC545DC11A89F0F10051A575 = { CreatedOnToolsVersion = 6.1.1; - LastSwiftMigration = 1010; + LastSwiftMigration = 1020; }; DC545DCC1A89F0F10051A575 = { CreatedOnToolsVersion = 6.1.1; - LastSwiftMigration = 1010; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; DC582F421BE1319F0017BE06 = { @@ -528,6 +552,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = DC545DB81A89F0F10051A575; @@ -700,7 +725,7 @@ ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_BUNDLE_IDENTIFIER = "de.rheinfabrik.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(PROJECT_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -718,7 +743,7 @@ CURRENT_PROJECT_VERSION = 1; GCC_NO_COMMON_BLOCKS = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACOSX_DEPLOYMENT_TARGET = 10.9; + MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_BUNDLE_IDENTIFIER = "de.rheinfabrik.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(PROJECT_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -738,8 +763,7 @@ DYLIB_CURRENT_VERSION = 1; INFOPLIST_FILE = "Heimdallr/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -754,8 +778,7 @@ DYLIB_CURRENT_VERSION = 1; INFOPLIST_FILE = "Heimdallr/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -767,8 +790,7 @@ INFOPLIST_FILE = "HeimdallrTests/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = HeimdallrTests; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -780,56 +802,55 @@ INFOPLIST_FILE = "HeimdallrTests/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = HeimdallrTests; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; DC582F551BE1319F0017BE06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DC712A521C85AD77009860A5 /* Mac-Framework.xcconfig */; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Heimdallr/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - SWIFT_VERSION = 4.2; + MACOSX_DEPLOYMENT_TARGET = 10.10; + SWIFT_VERSION = 5.0; }; name = Debug; }; DC582F561BE1319F0017BE06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DC712A521C85AD77009860A5 /* Mac-Framework.xcconfig */; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; INFOPLIST_FILE = "Heimdallr/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - SWIFT_VERSION = 4.2; + MACOSX_DEPLOYMENT_TARGET = 10.10; + SWIFT_VERSION = 5.0; }; name = Release; }; DC582F581BE1319F0017BE06 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DC712A4F1C85AD77009860A5 /* Mac-Application.xcconfig */; buildSettings = { INFOPLIST_FILE = "HeimdallrTests/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_NAME = HeimdallrTests; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; DC582F591BE1319F0017BE06 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DC712A4F1C85AD77009860A5 /* Mac-Application.xcconfig */; buildSettings = { INFOPLIST_FILE = "HeimdallrTests/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_NAME = HeimdallrTests; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Heimdallr/OAuthAccessToken.swift b/Heimdallr/OAuthAccessToken.swift index 1d4ee6b..f031e49 100644 --- a/Heimdallr/OAuthAccessToken.swift +++ b/Heimdallr/OAuthAccessToken.swift @@ -1,3 +1,4 @@ +import Foundation import Result /// An access token is used for authorizing requests to the resource endpoint. diff --git a/Heimdallr/OAuthAccessTokenKeychainStore.swift b/Heimdallr/OAuthAccessTokenKeychainStore.swift index 0746a5e..9df60c8 100644 --- a/Heimdallr/OAuthAccessTokenKeychainStore.swift +++ b/Heimdallr/OAuthAccessTokenKeychainStore.swift @@ -1,3 +1,4 @@ +import Foundation import Security internal struct Keychain { diff --git a/Heimdallr/OAuthError.swift b/Heimdallr/OAuthError.swift index 750fdbe..de87123 100644 --- a/Heimdallr/OAuthError.swift +++ b/Heimdallr/OAuthError.swift @@ -1,5 +1,6 @@ /// See: The OAuth 2.0 Authorization Framework, 5.2 NSError Response /// +import Foundation public let OAuthErrorDomain = "OAuthErrorDomain" public let OAuthErrorInvalidRequest = 1 @@ -21,7 +22,7 @@ public enum OAuthErrorCode: String { } public extension OAuthErrorCode { - public var intValue: Int { + var intValue: Int { switch self { case .InvalidRequest: return OAuthErrorInvalidRequest @@ -60,7 +61,7 @@ public class OAuthError { } public extension OAuthError { - public var nsError: NSError { + var nsError: NSError { var userInfo = [String: AnyObject]() if let description = description { @@ -88,7 +89,7 @@ extension OAuthError { } public class func decode(data: Data) -> OAuthError? { - guard let json: AnyObject? = try? JSONSerialization.jsonObject(with: data, options: JSONSerialization.ReadingOptions(rawValue: 0)) as AnyObject?, + guard let json: AnyObject? = ((try? JSONSerialization.jsonObject(with: data, options: JSONSerialization.ReadingOptions(rawValue: 0)) as AnyObject?) as AnyObject??), let jsonDictionary = json as? [String: AnyObject] else { return nil } diff --git a/Heimdallr/Supporting Files/Info.plist b/Heimdallr/Supporting Files/Info.plist index 582778e..71fefed 100644 --- a/Heimdallr/Supporting Files/Info.plist +++ b/Heimdallr/Supporting Files/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.6.1 + 3.7.0 CFBundleSignature ???? CFBundleVersion diff --git a/Heimdallr/URLRequestExtensions.swift b/Heimdallr/URLRequestExtensions.swift index b42836b..8886471 100644 --- a/Heimdallr/URLRequestExtensions.swift +++ b/Heimdallr/URLRequestExtensions.swift @@ -48,7 +48,7 @@ private let HTTPRequestHeaderFieldAuthorization = "Authorization" public extension URLRequest { /// Returns the HTTP `Authorization` header value or `nil` if not set. - public var HTTPAuthorization: String? { + var HTTPAuthorization: String? { return value(forHTTPHeaderField: HTTPRequestHeaderFieldAuthorization) } @@ -57,7 +57,7 @@ public extension URLRequest { /// - parameter value: The value to be set or `nil`. /// /// TODO: Declarations in extensions cannot override yet. - public mutating func setHTTPAuthorization(_ value: String?) { + mutating func setHTTPAuthorization(_ value: String?) { setValue(value, forHTTPHeaderField: HTTPRequestHeaderFieldAuthorization) } @@ -65,7 +65,7 @@ public extension URLRequest { /// authentication. /// /// - parameter authentication: The HTTP authentication to be set. - public mutating func setHTTPAuthorization(_ authentication: HTTPAuthentication) { + mutating func setHTTPAuthorization(_ authentication: HTTPAuthentication) { setHTTPAuthorization(authentication.value) } @@ -74,7 +74,7 @@ public extension URLRequest { /// - parameter parameters: The parameters to be encoded or `nil`. /// /// TODO: Tests crash without named parameter. - public mutating func setHTTPBody(parameters: [String: AnyObject]?) { + mutating func setHTTPBody(parameters: [String: AnyObject]?) { if let parameters = parameters { var components: [(String, String)] = [] for (key, value) in parameters {