Skip to content

Commit dd61fa1

Browse files
committed
Fix Swift 5 warnings
1 parent f7cada1 commit dd61fa1

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

PMKCoreLocation.xcodeproj/project.pbxproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
isa = PBXProject;
168168
attributes = {
169169
LastSwiftUpdateCheck = 0800;
170-
LastUpgradeCheck = 0930;
170+
LastUpgradeCheck = 1020;
171171
ORGANIZATIONNAME = "Max Howell";
172172
TargetAttributes = {
173173
63C7FFA61D5BEE09003BAE60 = {
@@ -184,11 +184,11 @@
184184
};
185185
buildConfigurationList = 63C7FFA11D5BEE09003BAE60 /* Build configuration list for PBXProject "PMKCoreLocation" */;
186186
compatibilityVersion = "Xcode 3.2";
187-
developmentRegion = English;
187+
developmentRegion = en;
188188
hasScannedForEncodings = 0;
189189
knownRegions = (
190-
English,
191190
en,
191+
Base,
192192
);
193193
mainGroup = 63C7FF9D1D5BEE09003BAE60;
194194
productRefGroup = 63C7FFA81D5BEE09003BAE60 /* Products */;
@@ -256,6 +256,7 @@
256256
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
257257
buildSettings = {
258258
ALWAYS_SEARCH_USER_PATHS = NO;
259+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
259260
CLANG_ANALYZER_NONNULL = YES;
260261
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
261262
CLANG_CXX_LIBRARY = "libc++";
@@ -323,6 +324,7 @@
323324
baseConfigurationReference = 63CCF8171D5C11B500503216 /* Carthage.xcconfig */;
324325
buildSettings = {
325326
ALWAYS_SEARCH_USER_PATHS = NO;
327+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
326328
CLANG_ANALYZER_NONNULL = YES;
327329
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
328330
CLANG_CXX_LIBRARY = "libc++";

PMKCoreLocation.xcodeproj/xcshareddata/xcschemes/PMKCoreLocation.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0930"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Sources/CLLocationManager+Promise.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,14 @@ extension CLLocationManager {
8888
return auth().then(std)
8989
case .denied, .restricted:
9090
return Promise(error: PMKError.notAuthorized)
91+
#if swift(>=5)
92+
@unknown default:
93+
fatalError()
94+
#endif
9195
}
9296
}
9397

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

0 commit comments

Comments
 (0)