Skip to content

Commit

Permalink
Update Swift package manager configuration (#322)
Browse files Browse the repository at this point in the history
* Update Swift package configuration
* Bump version to 5.1.0
  • Loading branch information
drdavec authored and ossus-lib committed Sep 11, 2019
1 parent 7e00f2d commit e4deb6c
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changelog
Version numbering represents the Swift version, plus a running number representing updates, fixes and new features at the same time.
You can also refer to commit logs to get details on what was implemented, fixed and improved.

### 5.1.0

- Update Swift package configuration for use with XCode 11.

### 5.0.0

- Swift 5.0 support.
Expand Down
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.0.3</string>
<string>5.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
26 changes: 18 additions & 8 deletions OAuth2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
65EC05E11C9050CB00DE9186 /* OAuth2KeychainAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EC05DF1C9050CB00DE9186 /* OAuth2KeychainAccount.swift */; };
65EC05E21C9050CB00DE9186 /* OAuth2KeychainAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EC05DF1C9050CB00DE9186 /* OAuth2KeychainAccount.swift */; };
CCCE40D6B4EAD9BF05C92ACE /* OAuth2CustomAuthorizer+iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCCE4C8DC3CB7713E59BC1EE /* OAuth2CustomAuthorizer+iOS.swift */; };
DD0CCBAD1C4DC83A0044C4E3 /* OAuth2WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController.swift */; };
DD0CCBAD1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift */; };
EA9758181B222CEA007744B1 /* OAuth2PasswordGrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9758171B222CEA007744B1 /* OAuth2PasswordGrant.swift */; };
EA97581E1B2242F9007744B1 /* OAuth2PasswordGrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9758171B222CEA007744B1 /* OAuth2PasswordGrant.swift */; };
EE1070341E5C7A4200250586 /* OAuth2CustomAuthorizerUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1070331E5C7A4200250586 /* OAuth2CustomAuthorizerUI.swift */; };
Expand All @@ -42,7 +42,7 @@
EE20118C1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE20118B1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift */; };
EE20118D1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE20118B1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift */; };
EE20118E1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE20118B1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift */; };
EE24862A1AC85DD4002B31AF /* OAuth2WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE2486291AC85DD4002B31AF /* OAuth2WebViewController.swift */; };
EE24862A1AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE2486291AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift */; };
EE2983701D40B83600933CDD /* OAuth2.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE29836F1D40B83600933CDD /* OAuth2.swift */; };
EE2983711D40B83600933CDD /* OAuth2.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE29836F1D40B83600933CDD /* OAuth2.swift */; };
EE2983721D40B83600933CDD /* OAuth2.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE29836F1D40B83600933CDD /* OAuth2.swift */; };
Expand Down Expand Up @@ -168,14 +168,15 @@
6598543F1C5B3B4000237D39 /* OAuth2Authorizer+tvOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "OAuth2Authorizer+tvOS.swift"; path = "Sources/tvOS/OAuth2Authorizer+tvOS.swift"; sourceTree = SOURCE_ROOT; };
659854461C5B3BEA00237D39 /* OAuth2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OAuth2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
65EC05DF1C9050CB00DE9186 /* OAuth2KeychainAccount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2KeychainAccount.swift; sourceTree = "<group>"; };
B4EE6D0922FF07D6004BC0D4 /* OAuth2Module.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2Module.swift; sourceTree = "<group>"; };
CCCE4C8DC3CB7713E59BC1EE /* OAuth2CustomAuthorizer+iOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OAuth2CustomAuthorizer+iOS.swift"; sourceTree = "<group>"; };
DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2WebViewController.swift; sourceTree = "<group>"; };
DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OAuth2WebViewController+macOS.swift"; sourceTree = "<group>"; };
EA9758171B222CEA007744B1 /* OAuth2PasswordGrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = OAuth2PasswordGrant.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
EE01F96E1C58D5D6003AEA7E /* generate-docs.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "generate-docs.sh"; sourceTree = "<group>"; };
EE1070331E5C7A4200250586 /* OAuth2CustomAuthorizerUI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2CustomAuthorizerUI.swift; sourceTree = "<group>"; };
EE1391D91AC5B41A002C7B18 /* OAuth2CodeGrantBasicAuth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = OAuth2CodeGrantBasicAuth.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
EE20118B1E44D0BD00913FA7 /* OAuth2DataLoaderSessionTaskDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2DataLoaderSessionTaskDelegate.swift; sourceTree = "<group>"; };
EE2486291AC85DD4002B31AF /* OAuth2WebViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2WebViewController.swift; sourceTree = "<group>"; };
EE2486291AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OAuth2WebViewController+iOS.swift"; sourceTree = "<group>"; };
EE29836A1D3FC28000933CDD /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
EE29836F1D40B83600933CDD /* OAuth2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2.swift; sourceTree = "<group>"; };
EE2983741D40BE7600933CDD /* OAuth2AuthorizerUI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2AuthorizerUI.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -268,12 +269,20 @@
path = tvOS;
sourceTree = "<group>";
};
B4EE6D0822FF07D6004BC0D4 /* OAuth */ = {
isa = PBXGroup;
children = (
B4EE6D0922FF07D6004BC0D4 /* OAuth2Module.swift */,
);
path = OAuth;
sourceTree = "<group>";
};
EE2486281AC85DD4002B31AF /* iOS */ = {
isa = PBXGroup;
children = (
EEC7A8C81AE47111008C30E7 /* OAuth2Authorizer+iOS.swift */,
CCCE4C8DC3CB7713E59BC1EE /* OAuth2CustomAuthorizer+iOS.swift */,
EE2486291AC85DD4002B31AF /* OAuth2WebViewController.swift */,
EE2486291AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift */,
);
path = iOS;
sourceTree = "<group>";
Expand Down Expand Up @@ -367,7 +376,7 @@
children = (
EEC7A8C61AE46C33008C30E7 /* OAuth2Authorizer+macOS.swift */,
19C919DC1E51CC8000BFC834 /* OAuth2CustomAuthorizer+macOS.swift */,
DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController.swift */,
DD0CCBAC1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift */,
);
path = macOS;
sourceTree = "<group>";
Expand Down Expand Up @@ -411,6 +420,7 @@
EEDB8626193FAAE500C4EEA1 /* OAuth2 */ = {
isa = PBXGroup;
children = (
B4EE6D0822FF07D6004BC0D4 /* OAuth */,
EE2983731D40BC8900933CDD /* Base */,
EE79F65C1BFBDFFF00746243 /* Flows */,
EE9EBF111D775A21003263FC /* DataLoader */,
Expand Down Expand Up @@ -710,7 +720,7 @@
EEACE1E01A7E8FC5009BF3A7 /* OAuth2CodeGrantFacebook.swift in Sources */,
EE1391DB1AC5B41A002C7B18 /* OAuth2CodeGrantBasicAuth.swift in Sources */,
EE507A391B1E15E000AE02E9 /* OAuth2DynReg.swift in Sources */,
EE24862A1AC85DD4002B31AF /* OAuth2WebViewController.swift in Sources */,
EE24862A1AC85DD4002B31AF /* OAuth2WebViewController+iOS.swift in Sources */,
EE79F6581BFA945C00746243 /* OAuth2ClientConfig.swift in Sources */,
EE79F65B1BFAA36900746243 /* OAuth2Error.swift in Sources */,
CCCE40D6B4EAD9BF05C92ACE /* OAuth2CustomAuthorizer+iOS.swift in Sources */,
Expand All @@ -726,7 +736,7 @@
EEAEF10B1CDBCF28001A1C6F /* OAuth2Logger.swift in Sources */,
65EC05E01C9050CB00DE9186 /* OAuth2KeychainAccount.swift in Sources */,
0C2F5E5B1DE2DB8500F621E0 /* OAuth2CodeGrantAzure.swift in Sources */,
DD0CCBAD1C4DC83A0044C4E3 /* OAuth2WebViewController.swift in Sources */,
DD0CCBAD1C4DC83A0044C4E3 /* OAuth2WebViewController+macOS.swift in Sources */,
EE9EBF1B1D775F74003263FC /* OAuth2Securable.swift in Sources */,
EE79F65A1BFAA36900746243 /* OAuth2Error.swift in Sources */,
EEC49F311C9BF22400989A18 /* OAuth2AuthRequest.swift in Sources */,
Expand Down
9 changes: 7 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,22 @@ let package = Package(
.macOS(.v10_11), .iOS(.v8), .tvOS(.v9), .watchOS(.v3)
],
products: [
.library(name: "OAuth2", targets: ["Base", "Flows", "DataLoader"]),
.library(name: "OAuth2", targets: ["OAuth2"]),
],
dependencies: [
// SwiftKeychain is not yet available as a Package, so we symlink to /Sources and make it a Target
//.package(url: "https://github.com/yankodimitrov/SwiftKeychain.git", majorVersion: 1),
],
targets: [
.target(name: "OAuth2",
dependencies: ["Base", "Flows", "DataLoader"]),
.target(name: "SwiftKeychain"),
.target(name: "Base", dependencies: [.target(name: "SwiftKeychain")]),
.target(name: "macOS", dependencies: [.target(name: "Base")]),
.target(name: "Flows", dependencies: [.target(name: "macOS")]),
.target(name: "iOS", dependencies: [.target(name: "Base")]),
.target(name: "tvOS", dependencies: [.target(name: "Base")]),
.target(name: "Flows", dependencies: [
.target(name: "macOS"), .target(name: "iOS"), .target(name: "tvOS")]),
.target(name: "DataLoader", dependencies: [.target(name: "Flows")]),
.testTarget(name: "BaseTests", dependencies: [.target(name: "Base"), .target(name: "Flows")]),
.testTarget(name: "FlowTests", dependencies: [.target(name: "Flows")]),
Expand Down
2 changes: 1 addition & 1 deletion Sources/Flows/OAuth2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ open class OAuth2: OAuth2Base {
- parameter callback: The callback to call on the main thread; if both json and error is nil no registration was attempted; error is nil
on success
*/
func registerClientIfNeeded(callback: @escaping ((OAuth2JSON?, OAuth2Error?) -> Void)) {
public func registerClientIfNeeded(callback: @escaping ((OAuth2JSON?, OAuth2Error?) -> Void)) {
if nil != clientId || !type(of: self).clientIdMandatory {
callOnMainThread() {
callback(nil, nil)
Expand Down
13 changes: 13 additions & 0 deletions Sources/OAuth2/OAuth2Module.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// OAuth2.swift
// OAuth2
//
// Created by Dave Carlson on 8/9/19.
//

@_exported import Base
@_exported import macOS
@_exported import iOS
@_exported import tvOS
@_exported import Flows
@_exported import DataLoader
2 changes: 1 addition & 1 deletion Sources/iOS/OAuth2Authorizer+iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ open class OAuth2Authorizer: OAuth2AuthorizerUI {
/// Used to store the authentication session.
private var authenticationSession: AnyObject?

public init(oauth2: OAuth2) {
public init(oauth2: OAuth2Base) {
self.oauth2 = oauth2
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ A simple iOS web view controller that allows you to display the login/authorizat
open class OAuth2WebViewController: UIViewController, WKNavigationDelegate {

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

/// The URL to load on first show.
open var startURL: URL? {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion p2.OAuth2.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Pod::Spec.new do |s|
s.name = 'p2.OAuth2'
s.version = '5.0.0'
s.version = '5.1.0'
s.summary = 'OAuth2 framework for macOS, iOS and tvOS, written in Swift.'
s.description = <<-DESC
OAuth2 frameworks for macOS, iOS and tvOS written in Swift.
Expand Down

0 comments on commit e4deb6c

Please sign in to comment.