Skip to content

Commit 7e00f2d

Browse files
committed
Update to Swift 5
1 parent f4b267e commit 7e00f2d

File tree

13 files changed

+111
-88
lines changed

13 files changed

+111
-88
lines changed

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Changelog
44
Version numbering represents the Swift version, plus a running number representing updates, fixes and new features at the same time.
55
You can also refer to commit logs to get details on what was implemented, fixed and improved.
66

7+
### 5.0.0
8+
9+
- Swift 5.0 support.
10+
- Add support for Authentication Session.
11+
[blork](https://github.com/blork)
12+
[#305](https://github.com/p2/OAuth2/pull/305)
13+
714
### 4.2.0
815

916
- Swift 4.2 support.

CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Contributors
33

44
Contributors to the codebase, in reverse chronological order:
55

6+
- Dave Carlson, @drdavec
7+
- Sam Oakley, @blork
68
- David Jennes, @davidjennes
79
- Tim Schmitz, @tschmitz
810
- Maxime Le Moine, @MaximeLM

OAuth2.xcodeproj/project.pbxproj

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@
565565
attributes = {
566566
LastSwiftMigration = 0700;
567567
LastSwiftUpdateCheck = 0700;
568-
LastUpgradeCheck = 0900;
568+
LastUpgradeCheck = 1100;
569569
ORGANIZATIONNAME = "Pascal Pfiffner";
570570
TargetAttributes = {
571571
659854451C5B3BEA00237D39 = {
@@ -576,21 +576,20 @@
576576
};
577577
EEE209461942772800736F1A = {
578578
CreatedOnToolsVersion = 6.0;
579-
LastSwiftMigration = 0800;
579+
LastSwiftMigration = 1100;
580580
};
581581
EEE209A119427DFE00736F1A = {
582582
CreatedOnToolsVersion = 6.0;
583-
LastSwiftMigration = 0900;
583+
LastSwiftMigration = 1100;
584584
TestTargetID = EEE209461942772800736F1A;
585585
};
586586
};
587587
};
588588
buildConfigurationList = EEDB861E193FAAE500C4EEA1 /* Build configuration list for PBXProject "OAuth2" */;
589589
compatibilityVersion = "Xcode 6.3";
590-
developmentRegion = English;
590+
developmentRegion = en;
591591
hasScannedForEncodings = 0;
592592
knownRegions = (
593-
English,
594593
en,
595594
Base,
596595
);
@@ -869,6 +868,7 @@
869868
isa = XCBuildConfiguration;
870869
buildSettings = {
871870
ALWAYS_SEARCH_USER_PATHS = NO;
871+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
872872
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
873873
CLANG_CXX_LIBRARY = "libc++";
874874
CLANG_ENABLE_MODULES = YES;
@@ -877,12 +877,14 @@
877877
CLANG_WARN_BOOL_CONVERSION = YES;
878878
CLANG_WARN_COMMA = YES;
879879
CLANG_WARN_CONSTANT_CONVERSION = YES;
880+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
880881
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
881882
CLANG_WARN_EMPTY_BODY = YES;
882883
CLANG_WARN_ENUM_CONVERSION = YES;
883884
CLANG_WARN_INFINITE_RECURSION = YES;
884885
CLANG_WARN_INT_CONVERSION = YES;
885886
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
887+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
886888
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
887889
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
888890
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -927,6 +929,7 @@
927929
isa = XCBuildConfiguration;
928930
buildSettings = {
929931
ALWAYS_SEARCH_USER_PATHS = NO;
932+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
930933
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
931934
CLANG_CXX_LIBRARY = "libc++";
932935
CLANG_ENABLE_MODULES = YES;
@@ -935,12 +938,14 @@
935938
CLANG_WARN_BOOL_CONVERSION = YES;
936939
CLANG_WARN_COMMA = YES;
937940
CLANG_WARN_CONSTANT_CONVERSION = YES;
941+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
938942
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
939943
CLANG_WARN_EMPTY_BODY = YES;
940944
CLANG_WARN_ENUM_CONVERSION = YES;
941945
CLANG_WARN_INFINITE_RECURSION = YES;
942946
CLANG_WARN_INT_CONVERSION = YES;
943947
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
948+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
944949
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
945950
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
946951
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -977,7 +982,7 @@
977982
isa = XCBuildConfiguration;
978983
buildSettings = {
979984
CLANG_ENABLE_MODULES = YES;
980-
CODE_SIGN_IDENTITY = "iPhone Developer";
985+
CODE_SIGN_IDENTITY = "";
981986
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
982987
DEFINES_MODULE = YES;
983988
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -999,7 +1004,7 @@
9991004
isa = XCBuildConfiguration;
10001005
buildSettings = {
10011006
CLANG_ENABLE_MODULES = YES;
1002-
CODE_SIGN_IDENTITY = "iPhone Developer";
1007+
CODE_SIGN_IDENTITY = "";
10031008
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
10041009
DEFINES_MODULE = YES;
10051010
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -1035,7 +1040,7 @@
10351040
PRODUCT_NAME = OAuth2;
10361041
SDKROOT = macosx;
10371042
SKIP_INSTALL = YES;
1038-
SWIFT_VERSION = 4.2;
1043+
SWIFT_VERSION = 5.0;
10391044
};
10401045
name = Debug;
10411046
};
@@ -1059,7 +1064,7 @@
10591064
SDKROOT = macosx;
10601065
SKIP_INSTALL = YES;
10611066
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1062-
SWIFT_VERSION = 4.2;
1067+
SWIFT_VERSION = 5.0;
10631068
};
10641069
name = Release;
10651070
};
@@ -1078,7 +1083,7 @@
10781083
PRODUCT_BUNDLE_IDENTIFIER = "com.github.p2.${PRODUCT_NAME:rfc1034identifier}";
10791084
PRODUCT_NAME = "$(TARGET_NAME)";
10801085
SDKROOT = macosx;
1081-
SWIFT_VERSION = 4.2;
1086+
SWIFT_VERSION = 5.0;
10821087
};
10831088
name = Debug;
10841089
};
@@ -1099,7 +1104,7 @@
10991104
PRODUCT_NAME = "$(TARGET_NAME)";
11001105
SDKROOT = macosx;
11011106
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1102-
SWIFT_VERSION = 4.2;
1107+
SWIFT_VERSION = 5.0;
11031108
};
11041109
name = Release;
11051110
};

OAuth2.xcodeproj/xcshareddata/xcschemes/OAuth2iOS.xcscheme

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,8 +26,16 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "EEDB8623193FAAE500C4EEA1"
34+
BuildableName = "OAuth2.framework"
35+
BlueprintName = "OAuth2iOS"
36+
ReferencedContainer = "container:OAuth2.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3139
<Testables>
3240
<TestableReference
3341
skipped = "NO">
@@ -40,23 +48,11 @@
4048
</BuildableReference>
4149
</TestableReference>
4250
</Testables>
43-
<MacroExpansion>
44-
<BuildableReference
45-
BuildableIdentifier = "primary"
46-
BlueprintIdentifier = "EEDB8623193FAAE500C4EEA1"
47-
BuildableName = "OAuth2.framework"
48-
BlueprintName = "OAuth2iOS"
49-
ReferencedContainer = "container:OAuth2.xcodeproj">
50-
</BuildableReference>
51-
</MacroExpansion>
52-
<AdditionalOptions>
53-
</AdditionalOptions>
5451
</TestAction>
5552
<LaunchAction
5653
buildConfiguration = "Debug"
5754
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5855
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59-
language = ""
6056
launchStyle = "0"
6157
useCustomWorkingDirectory = "NO"
6258
ignoresPersistentStateOnLaunch = "NO"
@@ -72,8 +68,6 @@
7268
ReferencedContainer = "container:OAuth2.xcodeproj">
7369
</BuildableReference>
7470
</MacroExpansion>
75-
<AdditionalOptions>
76-
</AdditionalOptions>
7771
</LaunchAction>
7872
<ProfileAction
7973
buildConfiguration = "Release"

OAuth2.xcodeproj/xcshareddata/xcschemes/OAuth2macOS.xcscheme

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -40,8 +40,16 @@
4040
buildConfiguration = "Debug"
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43-
language = ""
4443
shouldUseLaunchSchemeArgsEnv = "YES">
44+
<MacroExpansion>
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "EEE209461942772800736F1A"
48+
BuildableName = "OAuth2.framework"
49+
BlueprintName = "OAuth2macOS"
50+
ReferencedContainer = "container:OAuth2.xcodeproj">
51+
</BuildableReference>
52+
</MacroExpansion>
4553
<Testables>
4654
<TestableReference
4755
skipped = "NO">
@@ -54,23 +62,11 @@
5462
</BuildableReference>
5563
</TestableReference>
5664
</Testables>
57-
<MacroExpansion>
58-
<BuildableReference
59-
BuildableIdentifier = "primary"
60-
BlueprintIdentifier = "EEE209461942772800736F1A"
61-
BuildableName = "OAuth2.framework"
62-
BlueprintName = "OAuth2macOS"
63-
ReferencedContainer = "container:OAuth2.xcodeproj">
64-
</BuildableReference>
65-
</MacroExpansion>
66-
<AdditionalOptions>
67-
</AdditionalOptions>
6865
</TestAction>
6966
<LaunchAction
7067
buildConfiguration = "Debug"
7168
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
7269
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
73-
language = ""
7470
launchStyle = "0"
7571
useCustomWorkingDirectory = "NO"
7672
ignoresPersistentStateOnLaunch = "NO"
@@ -86,8 +82,6 @@
8682
ReferencedContainer = "container:OAuth2.xcodeproj">
8783
</BuildableReference>
8884
</MacroExpansion>
89-
<AdditionalOptions>
90-
</AdditionalOptions>
9185
</LaunchAction>
9286
<ProfileAction
9387
buildConfiguration = "Release"

OAuth2.xcodeproj/xcshareddata/xcschemes/OAuth2tvOS.xcscheme

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,8 +26,16 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "659854451C5B3BEA00237D39"
34+
BuildableName = "OAuth2.framework"
35+
BlueprintName = "OAuth2tvOS"
36+
ReferencedContainer = "container:OAuth2.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3139
<Testables>
3240
<TestableReference
3341
skipped = "NO">
@@ -40,23 +48,11 @@
4048
</BuildableReference>
4149
</TestableReference>
4250
</Testables>
43-
<MacroExpansion>
44-
<BuildableReference
45-
BuildableIdentifier = "primary"
46-
BlueprintIdentifier = "659854451C5B3BEA00237D39"
47-
BuildableName = "OAuth2.framework"
48-
BlueprintName = "OAuth2tvOS"
49-
ReferencedContainer = "container:OAuth2.xcodeproj">
50-
</BuildableReference>
51-
</MacroExpansion>
52-
<AdditionalOptions>
53-
</AdditionalOptions>
5451
</TestAction>
5552
<LaunchAction
5653
buildConfiguration = "Debug"
5754
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5855
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59-
language = ""
6056
launchStyle = "0"
6157
useCustomWorkingDirectory = "NO"
6258
ignoresPersistentStateOnLaunch = "NO"
@@ -72,8 +68,6 @@
7268
ReferencedContainer = "container:OAuth2.xcodeproj">
7369
</BuildableReference>
7470
</MacroExpansion>
75-
<AdditionalOptions>
76-
</AdditionalOptions>
7771
</LaunchAction>
7872
<ProfileAction
7973
buildConfiguration = "Release"

Package.swift

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// swift-tools-version:5.0
12
//
23
// Package.swift
34
// OAuth2
@@ -22,15 +23,24 @@ import PackageDescription
2223

2324
let package = Package(
2425
name: "OAuth2",
25-
targets: [
26-
Target(name: "SwiftKeychain"),
27-
Target(name: "Base", dependencies: [.Target(name: "SwiftKeychain")]),
28-
Target(name: "macOS", dependencies: [.Target(name: "Base")]),
29-
Target(name: "Flows", dependencies: [.Target(name: "macOS")]),
30-
Target(name: "DataLoader", dependencies: [.Target(name: "Flows")]),
26+
platforms: [
27+
.macOS(.v10_11), .iOS(.v8), .tvOS(.v9), .watchOS(.v3)
28+
],
29+
products: [
30+
.library(name: "OAuth2", targets: ["Base", "Flows", "DataLoader"]),
3131
],
3232
dependencies: [
3333
// SwiftKeychain is not yet available as a Package, so we symlink to /Sources and make it a Target
34-
//.Package(url: "https://github.com/yankodimitrov/SwiftKeychain.git", majorVersion: 1),
34+
//.package(url: "https://github.com/yankodimitrov/SwiftKeychain.git", majorVersion: 1),
35+
],
36+
targets: [
37+
.target(name: "SwiftKeychain"),
38+
.target(name: "Base", dependencies: [.target(name: "SwiftKeychain")]),
39+
.target(name: "macOS", dependencies: [.target(name: "Base")]),
40+
.target(name: "Flows", dependencies: [.target(name: "macOS")]),
41+
.target(name: "DataLoader", dependencies: [.target(name: "Flows")]),
42+
.testTarget(name: "BaseTests", dependencies: [.target(name: "Base"), .target(name: "Flows")]),
43+
.testTarget(name: "FlowTests", dependencies: [.target(name: "Flows")]),
44+
// .testTarget(name: "DataLoaderTests", dependencies: [.target(name: "DataLoader")]),
3545
]
3646
)

0 commit comments

Comments
 (0)