From 1ed4e902223442fc1ebe3fd73bfae90dbc613074 Mon Sep 17 00:00:00 2001 From: guzmano Date: Thu, 10 Sep 2020 20:59:38 -0500 Subject: [PATCH] MMLanScan: re-config to run with swift 5 version --- .../MMLanScanSwiftDemo.xcodeproj/project.pbxproj | 7 +++++-- MMLanScanSwiftDemo/MMLanScanSwiftDemo/AppDelegate.swift | 2 +- MMLanScanSwiftDemo/MMLanScanSwiftDemo/MainVC.swift | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/MMLanScanSwiftDemo/MMLanScanSwiftDemo.xcodeproj/project.pbxproj b/MMLanScanSwiftDemo/MMLanScanSwiftDemo.xcodeproj/project.pbxproj index 4044160..28d0c98 100644 --- a/MMLanScanSwiftDemo/MMLanScanSwiftDemo.xcodeproj/project.pbxproj +++ b/MMLanScanSwiftDemo/MMLanScanSwiftDemo.xcodeproj/project.pbxproj @@ -289,6 +289,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -411,6 +412,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -459,6 +461,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -480,7 +483,7 @@ SWIFT_OBJC_BRIDGING_HEADER = "MMLANScanSwiftDemo/MMLANScan-Bridging-Header.h"; SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; USER_HEADER_SEARCH_PATHS = "${SRCROOT}"; }; name = Debug; @@ -501,7 +504,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "MMLANScanSwiftDemo/MMLANScan-Bridging-Header.h"; SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; USER_HEADER_SEARCH_PATHS = "${SRCROOT}"; }; name = Release; diff --git a/MMLanScanSwiftDemo/MMLanScanSwiftDemo/AppDelegate.swift b/MMLanScanSwiftDemo/MMLanScanSwiftDemo/AppDelegate.swift index 525d71a..a2191ac 100644 --- a/MMLanScanSwiftDemo/MMLanScanSwiftDemo/AppDelegate.swift +++ b/MMLanScanSwiftDemo/MMLanScanSwiftDemo/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/MMLanScanSwiftDemo/MMLanScanSwiftDemo/MainVC.swift b/MMLanScanSwiftDemo/MMLanScanSwiftDemo/MainVC.swift index d92fe16..ea7b23d 100644 --- a/MMLanScanSwiftDemo/MMLanScanSwiftDemo/MainVC.swift +++ b/MMLanScanSwiftDemo/MMLanScanSwiftDemo/MainVC.swift @@ -112,9 +112,9 @@ class MainVC: UIViewController, MainPresenterDelegate, UITableViewDelegate, UITa //MARK: - Alert Controller func showAlert(title:String, message: String) { - let alertController = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert) + let alertController = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert) - let okAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.default) { (result : UIAlertAction) -> Void in} + let okAction = UIAlertAction(title: "OK", style: UIAlertAction.Style.default) { (result : UIAlertAction) -> Void in} alertController.addAction(okAction)