Skip to content

Commit

Permalink
Fix Swift 5 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Apr 8, 2019
1 parent f7cada1 commit dd61fa1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 5 additions & 3 deletions PMKCoreLocation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0800;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Max Howell";
TargetAttributes = {
63C7FFA61D5BEE09003BAE60 = {
Expand All @@ -184,11 +184,11 @@
};
buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKCoreLocation" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
mainGroup = 63C7FF9D1D5BEE09003BAE60;
productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */;
Expand Down Expand Up @@ -256,6 +256,7 @@
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -323,6 +324,7 @@
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 5 additions & 1 deletion Sources/CLLocationManager+Promise.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ extension CLLocationManager {
return auth().then(std)
case .denied, .restricted:
return Promise(error: PMKError.notAuthorized)
#if swift(>=5)
@unknown default:
fatalError()
#endif
}
}

@available(*, deprecated: 5.0, renamed: "requestLocation")
@available(*, deprecated, renamed: "requestLocation")
public class func promise(_ requestAuthorizationType: RequestAuthorizationType = .automatic, satisfying block: ((CLLocation) -> Bool)? = nil) -> Promise<[CLLocation]> {
return requestLocation(authorizationType: requestAuthorizationType, satisfying: block)
}
Expand Down

0 comments on commit dd61fa1

Please sign in to comment.