Skip to content

Commit 4e6cd49

Browse files
committed
Update to Swift 3.0
1 parent bdc0835 commit 4e6cd49

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

LocationPicker.xcodeproj/project.pbxproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
attributes = {
116116
LastSwiftMigration = 0700;
117117
LastSwiftUpdateCheck = 0700;
118-
LastUpgradeCheck = 0700;
118+
LastUpgradeCheck = 0800;
119119
ORGANIZATIONNAME = almassapargali;
120120
TargetAttributes = {
121121
B62462FE1B68A4DE00646DE2 = {
@@ -180,8 +180,10 @@
180180
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
181181
CLANG_WARN_EMPTY_BODY = YES;
182182
CLANG_WARN_ENUM_CONVERSION = YES;
183+
CLANG_WARN_INFINITE_RECURSION = YES;
183184
CLANG_WARN_INT_CONVERSION = YES;
184185
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
186+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
185187
CLANG_WARN_UNREACHABLE_CODE = YES;
186188
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
187189
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -229,8 +231,10 @@
229231
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
230232
CLANG_WARN_EMPTY_BODY = YES;
231233
CLANG_WARN_ENUM_CONVERSION = YES;
234+
CLANG_WARN_INFINITE_RECURSION = YES;
232235
CLANG_WARN_INT_CONVERSION = YES;
233236
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
237+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
234238
CLANG_WARN_UNREACHABLE_CODE = YES;
235239
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
236240
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -250,6 +254,7 @@
250254
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
251255
MTL_ENABLE_DEBUG_INFO = NO;
252256
SDKROOT = iphoneos;
257+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
253258
TARGETED_DEVICE_FAMILY = "1,2";
254259
VALIDATE_PRODUCT = YES;
255260
VERSIONING_SYSTEM = "apple-generic";
@@ -261,6 +266,7 @@
261266
isa = XCBuildConfiguration;
262267
buildSettings = {
263268
CLANG_ENABLE_MODULES = YES;
269+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
264270
DEFINES_MODULE = YES;
265271
DYLIB_COMPATIBILITY_VERSION = 1;
266272
DYLIB_CURRENT_VERSION = 1;
@@ -281,6 +287,7 @@
281287
isa = XCBuildConfiguration;
282288
buildSettings = {
283289
CLANG_ENABLE_MODULES = YES;
290+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
284291
DEFINES_MODULE = YES;
285292
DYLIB_COMPATIBILITY_VERSION = 1;
286293
DYLIB_CURRENT_VERSION = 1;

LocationPicker.xcodeproj/xcshareddata/xcschemes/LocationPicker.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 = "0700"
3+
LastUpgradeVersion = "0800"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

LocationPicker/LocationPickerViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ open class LocationPickerViewController: UIViewController {
5050
if let navigationBar = self.navigationController?.navigationBar,
5151
let barTintColor = navigationBar.barTintColor {
5252
return barTintColor
53-
} else { return .white() }
53+
} else { return .white }
5454
}()
5555

5656
/// default: .Minimal
@@ -167,7 +167,7 @@ open class LocationPickerViewController: UIViewController {
167167
self.resetBackButtonTitle()
168168
}
169169

170-
open override func preferredStatusBarStyle() -> UIStatusBarStyle {
170+
open override var preferredStatusBarStyle: UIStatusBarStyle {
171171
return statusBarStyle
172172
}
173173

LocationPicker/SearchHistoryManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ extension Location {
6969
LocationDicKeys.placemarkAddressDic: addressDic as AnyObject,
7070
LocationDicKeys.placemarkCoordinates: placemarkCoordinatesDic
7171
]
72-
if let name = name { dic[LocationDicKeys.name] = name }
73-
return dic
72+
if let name = name { dic[LocationDicKeys.name] = name as AnyObject }
73+
return dic as NSDictionary
7474
}
7575

7676
class func fromDefaultsDic(_ dic: NSDictionary) -> Location? {

0 commit comments

Comments
 (0)