Skip to content

Commit e4deb6c

Browse files
drdavecossus-lib
authored andcommitted
Update Swift package manager configuration (#322)
* Update Swift package configuration * Bump version to 5.1.0
1 parent 7e00f2d commit e4deb6c

10 files changed

+47
-15
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ 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.1.0
8+
9+
- Update Swift package configuration for use with XCode 11.
10+
711
### 5.0.0
812

913
- Swift 5.0 support.

Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.0.3</string>
18+
<string>5.1.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

OAuth2.xcodeproj/project.pbxproj

+18-8
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
65EC05E11C9050CB00DE9186 /* OAuth2KeychainAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EC05DF1C9050CB00DE9186 /* OAuth2KeychainAccount.swift */; };
3232
65EC05E21C9050CB00DE9186 /* OAuth2KeychainAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EC05DF1C9050CB00DE9186 /* OAuth2KeychainAccount.swift */; };
3333
CCCE40D6B4EAD9BF05C92ACE /* OAuth2CustomAuthorizer+iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCCE4C8DC3CB7713E59BC1EE /* OAuth2CustomAuthorizer+iOS.swift */; };
34-
DD0CCBAD1C4DC83A0044C4E3 /* OAuth2WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController.swift */; };
34+
DD0CCBAD1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift */; };
3535
EA9758181B222CEA007744B1 /* OAuth2PasswordGrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9758171B222CEA007744B1 /* OAuth2PasswordGrant.swift */; };
3636
EA97581E1B2242F9007744B1 /* OAuth2PasswordGrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9758171B222CEA007744B1 /* OAuth2PasswordGrant.swift */; };
3737
EE1070341E5C7A4200250586 /* OAuth2CustomAuthorizerUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1070331E5C7A4200250586 /* OAuth2CustomAuthorizerUI.swift */; };
@@ -42,7 +42,7 @@
4242
EE20118C1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE20118B1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift */; };
4343
EE20118D1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE20118B1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift */; };
4444
EE20118E1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE20118B1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift */; };
45-
EE24862A1AC85DD4002B31AF /* OAuth2WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE2486291AC85DD4002B31AF /* OAuth2WebViewController.swift */; };
45+
EE24862A1AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE2486291AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift */; };
4646
EE2983701D40B83600933CDD /* OAuth2.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE29836F1D40B83600933CDD /* OAuth2.swift */; };
4747
EE2983711D40B83600933CDD /* OAuth2.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE29836F1D40B83600933CDD /* OAuth2.swift */; };
4848
EE2983721D40B83600933CDD /* OAuth2.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE29836F1D40B83600933CDD /* OAuth2.swift */; };
@@ -168,14 +168,15 @@
168168
6598543F1C5B3B4000237D39 /* OAuth2Authorizer+tvOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "OAuth2Authorizer+tvOS.swift"; path = "Sources/tvOS/OAuth2Authorizer+tvOS.swift"; sourceTree = SOURCE_ROOT; };
169169
659854461C5B3BEA00237D39 /* OAuth2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OAuth2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
170170
65EC05DF1C9050CB00DE9186 /* OAuth2KeychainAccount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2KeychainAccount.swift; sourceTree = "<group>"; };
171+
B4EE6D0922FF07D6004BC0D4 /* OAuth2Module.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2Module.swift; sourceTree = "<group>"; };
171172
CCCE4C8DC3CB7713E59BC1EE /* OAuth2CustomAuthorizer+iOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OAuth2CustomAuthorizer+iOS.swift"; sourceTree = "<group>"; };
172-
DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2WebViewController.swift; sourceTree = "<group>"; };
173+
DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OAuth2WebViewController+macOS.swift"; sourceTree = "<group>"; };
173174
EA9758171B222CEA007744B1 /* OAuth2PasswordGrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = OAuth2PasswordGrant.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
174175
EE01F96E1C58D5D6003AEA7E /* generate-docs.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "generate-docs.sh"; sourceTree = "<group>"; };
175176
EE1070331E5C7A4200250586 /* OAuth2CustomAuthorizerUI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2CustomAuthorizerUI.swift; sourceTree = "<group>"; };
176177
EE1391D91AC5B41A002C7B18 /* OAuth2CodeGrantBasicAuth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = OAuth2CodeGrantBasicAuth.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
177178
EE20118B1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2DataLoaderSessionTaskDelegate.swift; sourceTree = "<group>"; };
178-
EE2486291AC85DD4002B31AF /* OAuth2WebViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2WebViewController.swift; sourceTree = "<group>"; };
179+
EE2486291AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OAuth2WebViewController+iOS.swift"; sourceTree = "<group>"; };
179180
EE29836A1D3FC28000933CDD /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
180181
EE29836F1D40B83600933CDD /* OAuth2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2.swift; sourceTree = "<group>"; };
181182
EE2983741D40BE7600933CDD /* OAuth2AuthorizerUI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2AuthorizerUI.swift; sourceTree = "<group>"; };
@@ -268,12 +269,20 @@
268269
path = tvOS;
269270
sourceTree = "<group>";
270271
};
272+
B4EE6D0822FF07D6004BC0D4 /* OAuth */ = {
273+
isa = PBXGroup;
274+
children = (
275+
B4EE6D0922FF07D6004BC0D4 /* OAuth2Module.swift */,
276+
);
277+
path = OAuth;
278+
sourceTree = "<group>";
279+
};
271280
EE2486281AC85DD4002B31AF /* iOS */ = {
272281
isa = PBXGroup;
273282
children = (
274283
EEC7A8C81AE47111008C30E7 /* OAuth2Authorizer+iOS.swift */,
275284
CCCE4C8DC3CB7713E59BC1EE /* OAuth2CustomAuthorizer+iOS.swift */,
276-
EE2486291AC85DD4002B31AF /* OAuth2WebViewController.swift */,
285+
EE2486291AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift */,
277286
);
278287
path = iOS;
279288
sourceTree = "<group>";
@@ -367,7 +376,7 @@
367376
children = (
368377
EEC7A8C61AE46C33008C30E7 /* OAuth2Authorizer+macOS.swift */,
369378
19C919DC1E51CC8000BFC834 /* OAuth2CustomAuthorizer+macOS.swift */,
370-
DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController.swift */,
379+
DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift */,
371380
);
372381
path = macOS;
373382
sourceTree = "<group>";
@@ -411,6 +420,7 @@
411420
EEDB8626193FAAE500C4EEA1 /* OAuth2 */ = {
412421
isa = PBXGroup;
413422
children = (
423+
B4EE6D0822FF07D6004BC0D4 /* OAuth */,
414424
EE2983731D40BC8900933CDD /* Base */,
415425
EE79F65C1BFBDFFF00746243 /* Flows */,
416426
EE9EBF111D775A21003263FC /* DataLoader */,
@@ -710,7 +720,7 @@
710720
EEACE1E01A7E8FC5009BF3A7 /* OAuth2CodeGrantFacebook.swift in Sources */,
711721
EE1391DB1AC5B41A002C7B18 /* OAuth2CodeGrantBasicAuth.swift in Sources */,
712722
EE507A391B1E15E000AE02E9 /* OAuth2DynReg.swift in Sources */,
713-
EE24862A1AC85DD4002B31AF /* OAuth2WebViewController.swift in Sources */,
723+
EE24862A1AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift in Sources */,
714724
EE79F6581BFA945C00746243 /* OAuth2ClientConfig.swift in Sources */,
715725
EE79F65B1BFAA36900746243 /* OAuth2Error.swift in Sources */,
716726
CCCE40D6B4EAD9BF05C92ACE /* OAuth2CustomAuthorizer+iOS.swift in Sources */,
@@ -726,7 +736,7 @@
726736
EEAEF10B1CDBCF28001A1C6F /* OAuth2Logger.swift in Sources */,
727737
65EC05E01C9050CB00DE9186 /* OAuth2KeychainAccount.swift in Sources */,
728738
0C2F5E5B1DE2DB8500F621E0 /* OAuth2CodeGrantAzure.swift in Sources */,
729-
DD0CCBAD1C4DC83A0044C4E3 /* OAuth2WebViewController.swift in Sources */,
739+
DD0CCBAD1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift in Sources */,
730740
EE9EBF1B1D775F74003263FC /* OAuth2Securable.swift in Sources */,
731741
EE79F65A1BFAA36900746243 /* OAuth2Error.swift in Sources */,
732742
EEC49F311C9BF22400989A18 /* OAuth2AuthRequest.swift in Sources */,

Package.swift

+7-2
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,22 @@ let package = Package(
2727
.macOS(.v10_11), .iOS(.v8), .tvOS(.v9), .watchOS(.v3)
2828
],
2929
products: [
30-
.library(name: "OAuth2", targets: ["Base", "Flows", "DataLoader"]),
30+
.library(name: "OAuth2", targets: ["OAuth2"]),
3131
],
3232
dependencies: [
3333
// SwiftKeychain is not yet available as a Package, so we symlink to /Sources and make it a Target
3434
//.package(url: "https://github.com/yankodimitrov/SwiftKeychain.git", majorVersion: 1),
3535
],
3636
targets: [
37+
.target(name: "OAuth2",
38+
dependencies: ["Base", "Flows", "DataLoader"]),
3739
.target(name: "SwiftKeychain"),
3840
.target(name: "Base", dependencies: [.target(name: "SwiftKeychain")]),
3941
.target(name: "macOS", dependencies: [.target(name: "Base")]),
40-
.target(name: "Flows", dependencies: [.target(name: "macOS")]),
42+
.target(name: "iOS", dependencies: [.target(name: "Base")]),
43+
.target(name: "tvOS", dependencies: [.target(name: "Base")]),
44+
.target(name: "Flows", dependencies: [
45+
.target(name: "macOS"), .target(name: "iOS"), .target(name: "tvOS")]),
4146
.target(name: "DataLoader", dependencies: [.target(name: "Flows")]),
4247
.testTarget(name: "BaseTests", dependencies: [.target(name: "Base"), .target(name: "Flows")]),
4348
.testTarget(name: "FlowTests", dependencies: [.target(name: "Flows")]),

Sources/Flows/OAuth2.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ open class OAuth2: OAuth2Base {
397397
- parameter callback: The callback to call on the main thread; if both json and error is nil no registration was attempted; error is nil
398398
on success
399399
*/
400-
func registerClientIfNeeded(callback: @escaping ((OAuth2JSON?, OAuth2Error?) -> Void)) {
400+
public func registerClientIfNeeded(callback: @escaping ((OAuth2JSON?, OAuth2Error?) -> Void)) {
401401
if nil != clientId || !type(of: self).clientIdMandatory {
402402
callOnMainThread() {
403403
callback(nil, nil)

Sources/OAuth2/OAuth2Module.swift

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// OAuth2.swift
3+
// OAuth2
4+
//
5+
// Created by Dave Carlson on 8/9/19.
6+
//
7+
8+
@_exported import Base
9+
@_exported import macOS
10+
@_exported import iOS
11+
@_exported import tvOS
12+
@_exported import Flows
13+
@_exported import DataLoader

Sources/iOS/OAuth2Authorizer+iOS.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ open class OAuth2Authorizer: OAuth2AuthorizerUI {
4343
/// Used to store the authentication session.
4444
private var authenticationSession: AnyObject?
4545

46-
public init(oauth2: OAuth2) {
46+
public init(oauth2: OAuth2Base) {
4747
self.oauth2 = oauth2
4848
}
4949

Sources/iOS/OAuth2WebViewController.swift Sources/iOS/OAuth2WebViewController+iOS.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ A simple iOS web view controller that allows you to display the login/authorizat
3232
open class OAuth2WebViewController: UIViewController, WKNavigationDelegate {
3333

3434
/// Handle to the OAuth2 instance in play, only used for debug lugging at this time.
35-
var oauth: OAuth2?
35+
var oauth: OAuth2Base?
3636

3737
/// The URL to load on first show.
3838
open var startURL: URL? {

p2.OAuth2.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Pod::Spec.new do |s|
99
s.name = 'p2.OAuth2'
10-
s.version = '5.0.0'
10+
s.version = '5.1.0'
1111
s.summary = 'OAuth2 framework for macOS, iOS and tvOS, written in Swift.'
1212
s.description = <<-DESC
1313
OAuth2 frameworks for macOS, iOS and tvOS written in Swift.

0 commit comments

Comments
 (0)