From 4149b6ac712eec60fdcd6955c65dc1115a5ce596 Mon Sep 17 00:00:00 2001 From: weak Date: Fri, 28 Jun 2019 14:51:43 +0200 Subject: [PATCH] Update to Swift 5/Xcode 10 - convert to Swift 5 - update project to recommended settings - update podspec - update .swift-version - update README - bump version --- .swift-version | 2 +- .../LocationPickerDemo.xcodeproj/project.pbxproj | 16 +++++++++++----- Demo/LocationPickerDemo/AppDelegate.swift | 2 +- Demo/LocationPickerDemo/Info.plist | 2 +- LocationPicker.podspec | 4 ++-- LocationPicker.xcodeproj/project.pbxproj | 13 ++++++++----- .../xcschemes/LocationPicker.xcscheme | 2 +- LocationPicker/Info.plist | 2 +- README.md | 2 +- 9 files changed, 27 insertions(+), 18 deletions(-) diff --git a/.swift-version b/.swift-version index bf77d54..819e07a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.2 +5.0 diff --git a/Demo/LocationPickerDemo.xcodeproj/project.pbxproj b/Demo/LocationPickerDemo.xcodeproj/project.pbxproj index 8714569..2bb0f7a 100644 --- a/Demo/LocationPickerDemo.xcodeproj/project.pbxproj +++ b/Demo/LocationPickerDemo.xcodeproj/project.pbxproj @@ -146,20 +146,20 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0920; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = almassapargali; TargetAttributes = { B62462CF1B68A4BC00646DE2 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = 5K522FTZKQ; - LastSwiftMigration = 0920; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = B62462CB1B68A4BC00646DE2 /* Build configuration list for PBXProject "LocationPickerDemo" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -248,6 +248,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -256,12 +257,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -302,6 +305,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -310,12 +314,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -355,7 +361,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.almassapargali.LocationPickerDemoApp; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -369,7 +375,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.almassapargali.LocationPickerDemoApp; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Demo/LocationPickerDemo/AppDelegate.swift b/Demo/LocationPickerDemo/AppDelegate.swift index 5645c49..1c16f80 100644 --- a/Demo/LocationPickerDemo/AppDelegate.swift +++ b/Demo/LocationPickerDemo/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Demo/LocationPickerDemo/Info.plist b/Demo/LocationPickerDemo/Info.plist index 0449c5a..cac9aa7 100644 --- a/Demo/LocationPickerDemo/Info.plist +++ b/Demo/LocationPickerDemo/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 1.4.0 CFBundleSignature ???? CFBundleVersion diff --git a/LocationPicker.podspec b/LocationPicker.podspec index de71c13..a54b36a 100644 --- a/LocationPicker.podspec +++ b/LocationPicker.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'LocationPicker' - s.version = '1.3.0' + s.version = '1.4.0' s.author = { 'Almas Sapargali' => 'almassapargali@gmail.com' } s.homepage = 'https://github.com/almassapargali/LocationPicker' s.description = "LocationPickerViewController is a UIViewController subclass to let users choose locations by searching or selecting on map. It's designed to work as UIImagePickerController." @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.source_files = 'LocationPicker' s.resource = 'LocationPicker/Images.xcassets' s.platform = :ios - s.swift_version = '4.2' + s.swift_version = '5.0' s.ios.deployment_target = '8.0' s.requires_arc = true end diff --git a/LocationPicker.xcodeproj/project.pbxproj b/LocationPicker.xcodeproj/project.pbxproj index fbea2ee..9029316 100644 --- a/LocationPicker.xcodeproj/project.pbxproj +++ b/LocationPicker.xcodeproj/project.pbxproj @@ -115,21 +115,22 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = almassapargali; TargetAttributes = { B62462FE1B68A4DE00646DE2 = { CreatedOnToolsVersion = 6.4; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; }; }; }; buildConfigurationList = B62462F91B68A4DE00646DE2 /* Build configuration list for PBXProject "LocationPicker" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = B62462F51B68A4DE00646DE2; productRefGroup = B62463001B68A4DE00646DE2 /* Products */; @@ -171,6 +172,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -230,6 +232,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -295,7 +298,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -315,7 +318,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.almassapargali.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/LocationPicker.xcodeproj/xcshareddata/xcschemes/LocationPicker.xcscheme b/LocationPicker.xcodeproj/xcshareddata/xcschemes/LocationPicker.xcscheme index ee432ff..9f2bf2f 100644 --- a/LocationPicker.xcodeproj/xcshareddata/xcschemes/LocationPicker.xcscheme +++ b/LocationPicker.xcodeproj/xcshareddata/xcschemes/LocationPicker.xcscheme @@ -1,6 +1,6 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.4.0 CFBundleSignature ???? CFBundleVersion diff --git a/README.md b/README.md index 656de6d..d042347 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ User can select location either by searching or long pressing on map. In both ca ## Installation -Uses Swift 4, use version `0.6.0` for Swift 2/Xcode 7, `1.0.3` for Swift 3. +Uses Swift 5, use version `1.3.0` for Swift 4.2, `1.0.3` for Swift 3, `0.6.0` for Swift 2. ### Carthage