Skip to content

Commit 7466c21

Browse files
drdavecossus-lib
authored andcommitted
Fix compile errors with Swift 5 (#313)
Thanks! This also fixes #311
1 parent db241a1 commit 7466c21

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

OAuth2.xcodeproj/project.pbxproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@
590590
developmentRegion = English;
591591
hasScannedForEncodings = 0;
592592
knownRegions = (
593+
English,
593594
en,
594595
Base,
595596
);
@@ -910,7 +911,7 @@
910911
GCC_WARN_UNUSED_FUNCTION = YES;
911912
GCC_WARN_UNUSED_VARIABLE = YES;
912913
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
913-
MACOSX_DEPLOYMENT_TARGET = 10.9;
914+
MACOSX_DEPLOYMENT_TARGET = 10.11;
914915
METAL_ENABLE_DEBUG_INFO = YES;
915916
ONLY_ACTIVE_ARCH = YES;
916917
SDKROOT = iphoneos;
@@ -961,7 +962,7 @@
961962
GCC_WARN_UNUSED_FUNCTION = YES;
962963
GCC_WARN_UNUSED_VARIABLE = YES;
963964
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
964-
MACOSX_DEPLOYMENT_TARGET = 10.9;
965+
MACOSX_DEPLOYMENT_TARGET = 10.11;
965966
METAL_ENABLE_DEBUG_INFO = NO;
966967
SDKROOT = iphoneos;
967968
SWIFT_VERSION = 4.0;

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ OAuth2 frameworks for **macOS**, **iOS** and **tvOS** written in Swift 4.2.
1212
- [📱 Sample iOS app](https://github.com/p2/OAuth2PodApp) (using CocoaPods)
1313
- [📖 Technical Documentation](https://p2.github.io/OAuth2)
1414

15-
OAuth2 requires Xcode 8, the built framework can be used on **OS X 10.9** or **iOS 8** and later.
15+
OAuth2 requires Xcode 8, the built framework can be used on **OS X 10.11** or **iOS 8** and later.
1616
Happy to accept pull requests, please see [CONTRIBUTING.md](./CONTRIBUTING.md)
1717

1818
### Swift Version

Sources/Base/OAuth2Error.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public extension Error {
338338
/**
339339
Convenience getter to easily retrieve an OAuth2Error from any Error.
340340
*/
341-
public var asOAuth2Error: OAuth2Error {
341+
var asOAuth2Error: OAuth2Error {
342342
if let oaerror = self as? OAuth2Error {
343343
return oaerror
344344
}

Sources/Base/OAuth2Logger.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ extension OAuth2Logger {
9999

100100
/** Log a message at the trace level. */
101101
public func trace(_ module: String? = "OAuth2", filename: String? = #file, line: Int? = #line, function: String? = #function, msg: @autoclosure() -> String) {
102-
log(.trace, module: module, filename: filename, line: line, function: function, msg: msg)
102+
log(.trace, module: module, filename: filename, line: line, function: function, msg: msg())
103103
}
104104

105105
/** Standard debug logging. */
106106
public func debug(_ module: String? = "OAuth2", filename: String? = #file, line: Int? = #line, function: String? = #function, msg: @autoclosure() -> String) {
107-
log(.debug, module: module, filename: filename, line: line, function: function, msg: msg)
107+
log(.debug, module: module, filename: filename, line: line, function: function, msg: msg())
108108
}
109109

110110
/** Log warning messages. */
111111
public func warn(_ module: String? = "OAuth2", filename: String? = #file, line: Int? = #line, function: String? = #function, msg: @autoclosure() -> String) {
112-
log(.warn, module: module, filename: filename, line: line, function: function, msg: msg)
112+
log(.warn, module: module, filename: filename, line: line, function: function, msg: msg())
113113
}
114114
}
115115

p2.OAuth2.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
3535
s.cocoapods_version = '>= 1.4.0'
3636

3737
s.ios.deployment_target = '8.0'
38-
s.osx.deployment_target = '10.10'
38+
s.osx.deployment_target = '10.11'
3939
s.tvos.deployment_target = '9.0'
4040
s.pod_target_xcconfig = {
4141
'OTHER_SWIFT_FLAGS' => '-DNO_MODULE_IMPORT -DNO_KEYCHAIN_IMPORT'

0 commit comments

Comments
 (0)