From 4ef4e59517295ba5d6b551fa77cdd64ecae2b187 Mon Sep 17 00:00:00 2001 From: Juan Uribe Date: Mon, 24 Sep 2018 12:58:08 -0500 Subject: [PATCH 1/6] Migrate to Swift 4.2 --- Example/Pods/Pods.xcodeproj/project.pbxproj | 6 +++--- Pod/Classes/EPExtensions.swift | 4 ++-- Pod/Classes/EPSignatureViewController.swift | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index dd9e263..cd77b00 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -324,7 +324,7 @@ LastUpgradeCheck = 0700; TargetAttributes = { 19D6D9705482D1B9CB1C3F1D8CC28599 = { - LastSwiftMigration = 0900; + LastSwiftMigration = 1000; }; }; }; @@ -428,7 +428,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -710,7 +710,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; diff --git a/Pod/Classes/EPExtensions.swift b/Pod/Classes/EPExtensions.swift index 17a3610..6b04fb8 100644 --- a/Pod/Classes/EPExtensions.swift +++ b/Pod/Classes/EPExtensions.swift @@ -17,10 +17,10 @@ extension UIViewController { } func showAlert(_ message: String, andTitle title: String) { - let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert) + let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert) // add an action (button) - alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)) + alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil)) // show the alert self.present(alert, animated: true, completion: nil) diff --git a/Pod/Classes/EPSignatureViewController.swift b/Pod/Classes/EPSignatureViewController.swift index 249d3b8..6ff07fb 100644 --- a/Pod/Classes/EPSignatureViewController.swift +++ b/Pod/Classes/EPSignatureViewController.swift @@ -39,13 +39,13 @@ open class EPSignatureViewController: UIViewController { override open func viewDidLoad() { super.viewDidLoad() - let cancelButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.cancel, target: self, action: #selector(EPSignatureViewController.onTouchCancelButton)) + let cancelButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.cancel, target: self, action: #selector(EPSignatureViewController.onTouchCancelButton)) cancelButton.tintColor = tintColor self.navigationItem.leftBarButtonItem = cancelButton - let doneButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.done, target: self, action: #selector(EPSignatureViewController.onTouchDoneButton)) + let doneButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.done, target: self, action: #selector(EPSignatureViewController.onTouchDoneButton)) doneButton.tintColor = tintColor - let clearButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.trash, target: self, action: #selector(EPSignatureViewController.onTouchClearButton)) + let clearButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.trash, target: self, action: #selector(EPSignatureViewController.onTouchClearButton)) clearButton.tintColor = tintColor if showsDate { @@ -58,7 +58,7 @@ open class EPSignatureViewController: UIViewController { } if showsSaveSignatureOption { - let actionButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.action, target: self, action: #selector(EPSignatureViewController.onTouchActionButton(_:))) + let actionButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.action, target: self, action: #selector(EPSignatureViewController.onTouchActionButton(_:))) actionButton.tintColor = tintColor self.navigationItem.rightBarButtonItems = [doneButton, clearButton, actionButton] switchSaveSignature.onTintColor = tintColor @@ -121,20 +121,20 @@ open class EPSignatureViewController: UIViewController { } @objc func onTouchActionButton(_ barButton: UIBarButtonItem) { - let action = UIAlertController(title: "Action", message: "", preferredStyle: UIAlertControllerStyle.actionSheet) + let action = UIAlertController(title: "Action", message: "", preferredStyle: UIAlertController.Style.actionSheet) action.view.tintColor = tintColor - action.addAction(UIAlertAction(title: "Load default signature", style: UIAlertActionStyle.default, handler: { action in + action.addAction(UIAlertAction(title: "Load default signature", style: UIAlertAction.Style.default, handler: { action in let docPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first let filePath = (docPath! as NSString).appendingPathComponent("sig.data") self.signatureView.loadSignature(filePath) })) - action.addAction(UIAlertAction(title: "Delete default signature", style: UIAlertActionStyle.destructive, handler: { action in + action.addAction(UIAlertAction(title: "Delete default signature", style: UIAlertAction.Style.destructive, handler: { action in self.signatureView.removeSignature() })) - action.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil)) + action.addAction(UIAlertAction(title: "Cancel", style: UIAlertAction.Style.cancel, handler: nil)) if let popOver = action.popoverPresentationController { popOver.barButtonItem = barButton From 9a5ace3c9354ef7dbb5d0225ca7d4ac32272b0b5 Mon Sep 17 00:00:00 2001 From: Juan Uribe Date: Mon, 24 Sep 2018 12:59:18 -0500 Subject: [PATCH 2/6] Migrate example to Swift 4.2 --- Example/EPSignature.xcodeproj/project.pbxproj | 12 ++++++------ Example/EPSignature/AppDelegate.swift | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Example/EPSignature.xcodeproj/project.pbxproj b/Example/EPSignature.xcodeproj/project.pbxproj index 56fba5a..5a8816a 100644 --- a/Example/EPSignature.xcodeproj/project.pbxproj +++ b/Example/EPSignature.xcodeproj/project.pbxproj @@ -210,12 +210,12 @@ 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = DG779MAMM2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1000; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = DG779MAMM2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1000; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -523,7 +523,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -540,7 +540,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -560,7 +560,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EPSignature_Example.app/EPSignature_Example"; }; name = Debug; @@ -576,7 +576,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EPSignature_Example.app/EPSignature_Example"; }; name = Release; diff --git a/Example/EPSignature/AppDelegate.swift b/Example/EPSignature/AppDelegate.swift index 3f1cbb9..cce0004 100644 --- a/Example/EPSignature/AppDelegate.swift +++ b/Example/EPSignature/AppDelegate.swift @@ -13,7 +13,7 @@ import UIKit class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { // Application launch state return true } From d424aa251a7d5c5d93ddd121fd1640607df5d270 Mon Sep 17 00:00:00 2001 From: Juan Uribe Date: Mon, 24 Sep 2018 13:09:48 -0500 Subject: [PATCH 3/6] Update swift version to 4.2 --- .swift-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.swift-version b/.swift-version index 9f55b2c..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +4.2 From a228b4103c5902bb6fae5c703daa50e4961b3aff Mon Sep 17 00:00:00 2001 From: iamfools Date: Mon, 1 Oct 2018 10:39:58 +0700 Subject: [PATCH 4/6] Add Swift 4.2 support --- .travis.yml | 2 +- Example/EPSignature.xcodeproj/project.pbxproj | 16 ++++++++-------- Example/Pods/Pods.xcodeproj/project.pbxproj | 6 +++--- Pod/Classes/EPExtensions.swift | 4 ++-- Pod/Classes/EPSignatureViewController.swift | 16 ++++++++-------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index dba511b..de8cde0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: objective-c #1 osx_image: xcode9.3 #2 xcode_workspace: Example/EPSignature.xcworkspace #3 -xcode_scheme: EPSignature #4 +xcode_scheme: EPSignature-Example #4 xcode_sdk: iphonesimulator10.3 #5 before_install: diff --git a/Example/EPSignature.xcodeproj/project.pbxproj b/Example/EPSignature.xcodeproj/project.pbxproj index 56fba5a..4e6f994 100644 --- a/Example/EPSignature.xcodeproj/project.pbxproj +++ b/Example/EPSignature.xcodeproj/project.pbxproj @@ -209,13 +209,13 @@ TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - DevelopmentTeam = DG779MAMM2; - LastSwiftMigration = 0900; + DevelopmentTeam = L74Y3RTC7X; + LastSwiftMigration = ""; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - DevelopmentTeam = DG779MAMM2; - LastSwiftMigration = 0900; + DevelopmentTeam = L74Y3RTC7X; + LastSwiftMigration = ""; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -516,7 +516,7 @@ baseConfigurationReference = 1CC0D063C0E6BB1DA5D21548 /* Pods-EPSignature_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = DG779MAMM2; + DEVELOPMENT_TEAM = L74Y3RTC7X; INFOPLIST_FILE = EPSignature/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -533,7 +533,7 @@ baseConfigurationReference = EAC7FAB870C77D62CB94C285 /* Pods-EPSignature_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = DG779MAMM2; + DEVELOPMENT_TEAM = L74Y3RTC7X; INFOPLIST_FILE = EPSignature/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -550,7 +550,7 @@ baseConfigurationReference = BADBD621301FD946BBB4C228 /* Pods-EPSignature_Tests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = DG779MAMM2; + DEVELOPMENT_TEAM = L74Y3RTC7X; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -570,7 +570,7 @@ baseConfigurationReference = 0F8DB633D789A18A31700E0D /* Pods-EPSignature_Tests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = DG779MAMM2; + DEVELOPMENT_TEAM = L74Y3RTC7X; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index dd9e263..f02ddd7 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -324,7 +324,7 @@ LastUpgradeCheck = 0700; TargetAttributes = { 19D6D9705482D1B9CB1C3F1D8CC28599 = { - LastSwiftMigration = 0900; + LastSwiftMigration = ""; }; }; }; @@ -428,7 +428,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -710,7 +710,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; diff --git a/Pod/Classes/EPExtensions.swift b/Pod/Classes/EPExtensions.swift index 17a3610..7bcd773 100644 --- a/Pod/Classes/EPExtensions.swift +++ b/Pod/Classes/EPExtensions.swift @@ -17,10 +17,10 @@ extension UIViewController { } func showAlert(_ message: String, andTitle title: String) { - let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert) + let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) // add an action (button) - alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)) + alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil)) // show the alert self.present(alert, animated: true, completion: nil) diff --git a/Pod/Classes/EPSignatureViewController.swift b/Pod/Classes/EPSignatureViewController.swift index 249d3b8..01176f2 100644 --- a/Pod/Classes/EPSignatureViewController.swift +++ b/Pod/Classes/EPSignatureViewController.swift @@ -39,13 +39,13 @@ open class EPSignatureViewController: UIViewController { override open func viewDidLoad() { super.viewDidLoad() - let cancelButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.cancel, target: self, action: #selector(EPSignatureViewController.onTouchCancelButton)) + let cancelButton = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(EPSignatureViewController.onTouchCancelButton)) cancelButton.tintColor = tintColor self.navigationItem.leftBarButtonItem = cancelButton - let doneButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.done, target: self, action: #selector(EPSignatureViewController.onTouchDoneButton)) + let doneButton = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(EPSignatureViewController.onTouchDoneButton)) doneButton.tintColor = tintColor - let clearButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.trash, target: self, action: #selector(EPSignatureViewController.onTouchClearButton)) + let clearButton = UIBarButtonItem(barButtonSystemItem: .trash, target: self, action: #selector(EPSignatureViewController.onTouchClearButton)) clearButton.tintColor = tintColor if showsDate { @@ -58,7 +58,7 @@ open class EPSignatureViewController: UIViewController { } if showsSaveSignatureOption { - let actionButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.action, target: self, action: #selector(EPSignatureViewController.onTouchActionButton(_:))) + let actionButton = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(EPSignatureViewController.onTouchActionButton(_:))) actionButton.tintColor = tintColor self.navigationItem.rightBarButtonItems = [doneButton, clearButton, actionButton] switchSaveSignature.onTintColor = tintColor @@ -121,20 +121,20 @@ open class EPSignatureViewController: UIViewController { } @objc func onTouchActionButton(_ barButton: UIBarButtonItem) { - let action = UIAlertController(title: "Action", message: "", preferredStyle: UIAlertControllerStyle.actionSheet) + let action = UIAlertController(title: "Action", message: "", preferredStyle: .actionSheet) action.view.tintColor = tintColor - action.addAction(UIAlertAction(title: "Load default signature", style: UIAlertActionStyle.default, handler: { action in + action.addAction(UIAlertAction(title: "Load default signature", style: .default, handler: { action in let docPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first let filePath = (docPath! as NSString).appendingPathComponent("sig.data") self.signatureView.loadSignature(filePath) })) - action.addAction(UIAlertAction(title: "Delete default signature", style: UIAlertActionStyle.destructive, handler: { action in + action.addAction(UIAlertAction(title: "Delete default signature", style: .destructive, handler: { action in self.signatureView.removeSignature() })) - action.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil)) + action.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) if let popOver = action.popoverPresentationController { popOver.barButtonItem = barButton From 54a1aa099c34b4a433e61eb1da73b75641ab8f01 Mon Sep 17 00:00:00 2001 From: iamfools Date: Mon, 1 Oct 2018 11:05:15 +0700 Subject: [PATCH 5/6] Test Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index de8cde0..ed199f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ osx_image: xcode9.3 #2 xcode_workspace: Example/EPSignature.xcworkspace #3 xcode_scheme: EPSignature-Example #4 xcode_sdk: iphonesimulator10.3 #5 - + before_install: - xcodebuild -version script: From f4db7bca5780b3e8d6445e2cb1a5bf0dbb90c971 Mon Sep 17 00:00:00 2001 From: Juan Alberto Uribe Date: Mon, 1 Oct 2018 09:01:12 -0500 Subject: [PATCH 6/6] Revert "Swift 4.2" --- .travis.yml | 4 ++-- Example/EPSignature.xcodeproj/project.pbxproj | 16 ++++++++-------- Example/Pods/Pods.xcodeproj/project.pbxproj | 6 +++--- Pod/Classes/EPExtensions.swift | 4 ++-- Pod/Classes/EPSignatureViewController.swift | 16 ++++++++-------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index ed199f4..dba511b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: objective-c #1 osx_image: xcode9.3 #2 xcode_workspace: Example/EPSignature.xcworkspace #3 -xcode_scheme: EPSignature-Example #4 +xcode_scheme: EPSignature #4 xcode_sdk: iphonesimulator10.3 #5 - + before_install: - xcodebuild -version script: diff --git a/Example/EPSignature.xcodeproj/project.pbxproj b/Example/EPSignature.xcodeproj/project.pbxproj index 4e6f994..56fba5a 100644 --- a/Example/EPSignature.xcodeproj/project.pbxproj +++ b/Example/EPSignature.xcodeproj/project.pbxproj @@ -209,13 +209,13 @@ TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - DevelopmentTeam = L74Y3RTC7X; - LastSwiftMigration = ""; + DevelopmentTeam = DG779MAMM2; + LastSwiftMigration = 0900; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - DevelopmentTeam = L74Y3RTC7X; - LastSwiftMigration = ""; + DevelopmentTeam = DG779MAMM2; + LastSwiftMigration = 0900; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -516,7 +516,7 @@ baseConfigurationReference = 1CC0D063C0E6BB1DA5D21548 /* Pods-EPSignature_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = L74Y3RTC7X; + DEVELOPMENT_TEAM = DG779MAMM2; INFOPLIST_FILE = EPSignature/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -533,7 +533,7 @@ baseConfigurationReference = EAC7FAB870C77D62CB94C285 /* Pods-EPSignature_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = L74Y3RTC7X; + DEVELOPMENT_TEAM = DG779MAMM2; INFOPLIST_FILE = EPSignature/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -550,7 +550,7 @@ baseConfigurationReference = BADBD621301FD946BBB4C228 /* Pods-EPSignature_Tests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = L74Y3RTC7X; + DEVELOPMENT_TEAM = DG779MAMM2; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -570,7 +570,7 @@ baseConfigurationReference = 0F8DB633D789A18A31700E0D /* Pods-EPSignature_Tests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = L74Y3RTC7X; + DEVELOPMENT_TEAM = DG779MAMM2; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index f02ddd7..dd9e263 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -324,7 +324,7 @@ LastUpgradeCheck = 0700; TargetAttributes = { 19D6D9705482D1B9CB1C3F1D8CC28599 = { - LastSwiftMigration = ""; + LastSwiftMigration = 0900; }; }; }; @@ -428,7 +428,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -710,7 +710,7 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; diff --git a/Pod/Classes/EPExtensions.swift b/Pod/Classes/EPExtensions.swift index 7bcd773..17a3610 100644 --- a/Pod/Classes/EPExtensions.swift +++ b/Pod/Classes/EPExtensions.swift @@ -17,10 +17,10 @@ extension UIViewController { } func showAlert(_ message: String, andTitle title: String) { - let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) + let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert) // add an action (button) - alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil)) + alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)) // show the alert self.present(alert, animated: true, completion: nil) diff --git a/Pod/Classes/EPSignatureViewController.swift b/Pod/Classes/EPSignatureViewController.swift index 01176f2..249d3b8 100644 --- a/Pod/Classes/EPSignatureViewController.swift +++ b/Pod/Classes/EPSignatureViewController.swift @@ -39,13 +39,13 @@ open class EPSignatureViewController: UIViewController { override open func viewDidLoad() { super.viewDidLoad() - let cancelButton = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(EPSignatureViewController.onTouchCancelButton)) + let cancelButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.cancel, target: self, action: #selector(EPSignatureViewController.onTouchCancelButton)) cancelButton.tintColor = tintColor self.navigationItem.leftBarButtonItem = cancelButton - let doneButton = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(EPSignatureViewController.onTouchDoneButton)) + let doneButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.done, target: self, action: #selector(EPSignatureViewController.onTouchDoneButton)) doneButton.tintColor = tintColor - let clearButton = UIBarButtonItem(barButtonSystemItem: .trash, target: self, action: #selector(EPSignatureViewController.onTouchClearButton)) + let clearButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.trash, target: self, action: #selector(EPSignatureViewController.onTouchClearButton)) clearButton.tintColor = tintColor if showsDate { @@ -58,7 +58,7 @@ open class EPSignatureViewController: UIViewController { } if showsSaveSignatureOption { - let actionButton = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(EPSignatureViewController.onTouchActionButton(_:))) + let actionButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.action, target: self, action: #selector(EPSignatureViewController.onTouchActionButton(_:))) actionButton.tintColor = tintColor self.navigationItem.rightBarButtonItems = [doneButton, clearButton, actionButton] switchSaveSignature.onTintColor = tintColor @@ -121,20 +121,20 @@ open class EPSignatureViewController: UIViewController { } @objc func onTouchActionButton(_ barButton: UIBarButtonItem) { - let action = UIAlertController(title: "Action", message: "", preferredStyle: .actionSheet) + let action = UIAlertController(title: "Action", message: "", preferredStyle: UIAlertControllerStyle.actionSheet) action.view.tintColor = tintColor - action.addAction(UIAlertAction(title: "Load default signature", style: .default, handler: { action in + action.addAction(UIAlertAction(title: "Load default signature", style: UIAlertActionStyle.default, handler: { action in let docPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first let filePath = (docPath! as NSString).appendingPathComponent("sig.data") self.signatureView.loadSignature(filePath) })) - action.addAction(UIAlertAction(title: "Delete default signature", style: .destructive, handler: { action in + action.addAction(UIAlertAction(title: "Delete default signature", style: UIAlertActionStyle.destructive, handler: { action in self.signatureView.removeSignature() })) - action.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) + action.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil)) if let popOver = action.popoverPresentationController { popOver.barButtonItem = barButton