diff --git a/Format.xcodeproj/project.pbxproj b/Format.xcodeproj/project.pbxproj index 23cd5a5..be00b1b 100644 --- a/Format.xcodeproj/project.pbxproj +++ b/Format.xcodeproj/project.pbxproj @@ -421,7 +421,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -441,7 +441,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.Format; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Format/NumberFormatter.swift b/Format/NumberFormatter.swift index 87bd8b7..ed7a38d 100644 --- a/Format/NumberFormatter.swift +++ b/Format/NumberFormatter.swift @@ -90,7 +90,7 @@ open class NumberFormat { } else if formatter.modifier == NumberFormatterSpellOutKey { formattedString = nsFormatter.string(from: number) } else if formatter.modifier == NumberFormatterDistanceKey { - let distance = number as CLLocationDistance + let distance = number as! CLLocationDistance formattedString = distanceFormatter.string(fromDistance: distance) } }