From 08e4ba612a4b5b4f45acbb87c9e5ae1ce3b90a1f Mon Sep 17 00:00:00 2001 From: Fidel Morales Date: Thu, 24 Sep 2020 14:58:35 -0600 Subject: [PATCH 1/6] Enable recomended headers by xcode 12 compiler: CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER --- .../project.pbxproj | 4 +++- .../xcschemes/MKToolTip-Example-Objc.xcscheme | 24 ++++++++----------- .../project.pbxproj | 4 +++- .../xcschemes/MKToolTip-Example.xcscheme | 24 ++++++++----------- MKToolTip/MKToolTip.xcodeproj/project.pbxproj | 4 +++- .../xcshareddata/xcschemes/MKToolTip.xcscheme | 24 ++++++++----------- 6 files changed, 39 insertions(+), 45 deletions(-) diff --git a/MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/project.pbxproj b/MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/project.pbxproj index 0d2d89d..1901bc8 100644 --- a/MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/project.pbxproj +++ b/MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/project.pbxproj @@ -167,7 +167,7 @@ B5360F1C21633CC200E373AB /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1200; ORGANIZATIONNAME = "Metin Kilicaslan"; TargetAttributes = { B5360F2321633CC200E373AB = { @@ -293,6 +293,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -352,6 +353,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; diff --git a/MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/xcshareddata/xcschemes/MKToolTip-Example-Objc.xcscheme b/MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/xcshareddata/xcschemes/MKToolTip-Example-Objc.xcscheme index e4dad85..bb9b43b 100644 --- a/MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/xcshareddata/xcschemes/MKToolTip-Example-Objc.xcscheme +++ b/MKToolTip-Example-Objc/MKToolTip-Example-Objc.xcodeproj/xcshareddata/xcschemes/MKToolTip-Example-Objc.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -39,17 +48,6 @@ - - - - - - - - + + + + @@ -39,17 +48,6 @@ - - - - - - - - + + + + @@ -39,17 +48,6 @@ - - - - - - - - Date: Thu, 24 Sep 2020 15:00:04 -0600 Subject: [PATCH 2/6] Bump swift version to 5 --- MKToolTip/MKToolTip.xcodeproj/project.pbxproj | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/MKToolTip/MKToolTip.xcodeproj/project.pbxproj b/MKToolTip/MKToolTip.xcodeproj/project.pbxproj index 14d018b..ebdc15d 100644 --- a/MKToolTip/MKToolTip.xcodeproj/project.pbxproj +++ b/MKToolTip/MKToolTip.xcodeproj/project.pbxproj @@ -154,10 +154,11 @@ TargetAttributes = { B5CCDEA020FB45D600855E09 = { CreatedOnToolsVersion = 9.4.1; - LastSwiftMigration = 0940; + LastSwiftMigration = 1200; }; B5CCDEA920FB45D600855E09 = { CreatedOnToolsVersion = 9.4.1; + LastSwiftMigration = 1200; }; }; }; @@ -370,7 +371,7 @@ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -397,7 +398,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTip; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -416,7 +417,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTipTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -435,7 +436,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTipTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; From 831596f70b57f1606786523b25454b2035eb8fb1 Mon Sep 17 00:00:00 2001 From: Fidel Morales Date: Thu, 24 Sep 2020 15:00:47 -0600 Subject: [PATCH 3/6] Remove redundant public modifier in public extension --- MKToolTip/MKToolTip/MKToolTip.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MKToolTip/MKToolTip/MKToolTip.swift b/MKToolTip/MKToolTip/MKToolTip.swift index 484c1fa..85bdff3 100644 --- a/MKToolTip/MKToolTip/MKToolTip.swift +++ b/MKToolTip/MKToolTip/MKToolTip.swift @@ -32,7 +32,7 @@ import UIKit public extension UIView { - @objc public func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) { + @objc func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) { let tooltip = MKToolTip(view: self, identifier: identifier, title: title, message: message, button: button, arrowPosition: arrowPosition, preferences: preferences, delegate: delegate) tooltip.calculateFrame() tooltip.show() @@ -42,7 +42,7 @@ public extension UIView { public extension UIBarItem { - @objc public func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) { + @objc func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) { if let view = self.view { view.showToolTip(identifier: identifier, title: title, message: message, button: button, arrowPosition: arrowPosition, preferences: preferences, delegate: delegate) } From eb4165c38945dd3d636127a733e4ab59de06a511 Mon Sep 17 00:00:00 2001 From: Fidel Morales Date: Thu, 24 Sep 2020 15:01:32 -0600 Subject: [PATCH 4/6] Add missing paramter in objc example --- .../MKToolTip-Example-Objc/ViewController.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MKToolTip-Example-Objc/MKToolTip-Example-Objc/ViewController.m b/MKToolTip-Example-Objc/MKToolTip-Example-Objc/ViewController.m index bc10885..bbc1f57 100644 --- a/MKToolTip-Example-Objc/MKToolTip-Example-Objc/ViewController.m +++ b/MKToolTip-Example-Objc/MKToolTip-Example-Objc/ViewController.m @@ -24,6 +24,7 @@ - (IBAction)barButton1Tapped:(UIBarButtonItem *)sender { [sender showToolTipWithIdentifier:@"" title:@"Pharetra" message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus." + button: nil arrowPosition:ArrowPositionTop preferences:[[ToolTipPreferences alloc] init] delegate:nil]; @@ -42,6 +43,7 @@ - (IBAction)button1Tapped:(UIButton *)sender { [sender showToolTipWithIdentifier:@"" title:nil message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus." + button: nil arrowPosition:ArrowPositionLeft preferences:preferences delegate:nil]; @@ -58,6 +60,7 @@ - (IBAction)button2Tapped:(UIButton *)sender { [sender showToolTipWithIdentifier:@"" title:@"Dapibus" message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus." + button: nil arrowPosition:ArrowPositionRight preferences:preferences delegate:nil]; @@ -75,6 +78,7 @@ - (IBAction)button3Tapped:(UIButton *)sender { [sender showToolTipWithIdentifier:@"" title:nil message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus." + button: nil arrowPosition:ArrowPositionBottom preferences:preferences delegate:nil]; From ca024d7b8bd60b21fddb54d1fc42d62206f50b93 Mon Sep 17 00:00:00 2001 From: Fidel Morales Date: Thu, 24 Sep 2020 15:03:44 -0600 Subject: [PATCH 5/6] Update podspec --- MKToolTip.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MKToolTip.podspec b/MKToolTip.podspec index 8e01a6a..bc7760a 100644 --- a/MKToolTip.podspec +++ b/MKToolTip.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "MKToolTip" - spec.version = "1.0.6" + spec.version = "1.0.7" spec.summary = "Simple tooltip view written in Swift." spec.description = "MKToolTip is a customizable tooltip view written in Swift that can be used as a informative tip." spec.homepage = "https://github.com/metinkilicaslan/MKToolTip" @@ -8,7 +8,7 @@ Pod::Spec.new do |spec| spec.authors = { "Metin Kilicaslan" => 'metinkilicaslan@gmail.com' } spec.ios.deployment_target = "9.0" - spec.swift_version = "4.2" + spec.swift_version = "5.0" spec.requires_arc = true spec.source = { :git => "https://github.com/metinkilicaslan/MKToolTip.git", :tag => "v#{spec.version}"} spec.source_files = "MKToolTip/MKToolTip/*.{h,swift}" From 1c080206cb609bef86fc14840e774c2600335f79 Mon Sep 17 00:00:00 2001 From: Fidel Morales Date: Thu, 24 Sep 2020 15:07:04 -0600 Subject: [PATCH 6/6] Update unit tests project to swfit 5 --- .../MKToolTip-Example.xcodeproj/project.pbxproj | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MKToolTip-Example/MKToolTip-Example.xcodeproj/project.pbxproj b/MKToolTip-Example/MKToolTip-Example.xcodeproj/project.pbxproj index e471bc1..75a2395 100644 --- a/MKToolTip-Example/MKToolTip-Example.xcodeproj/project.pbxproj +++ b/MKToolTip-Example/MKToolTip-Example.xcodeproj/project.pbxproj @@ -166,9 +166,11 @@ TargetAttributes = { B5CCDEF420FB5C7500855E09 = { CreatedOnToolsVersion = 9.4.1; + LastSwiftMigration = 1200; }; B5CCDF0820FB5C7600855E09 = { CreatedOnToolsVersion = 9.4.1; + LastSwiftMigration = 1200; TestTargetID = B5CCDEF420FB5C7500855E09; }; }; @@ -390,7 +392,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -409,7 +411,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -429,7 +431,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-ExampleTests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MKToolTip-Example.app/MKToolTip-Example"; }; @@ -450,7 +452,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-ExampleTests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MKToolTip-Example.app/MKToolTip-Example"; };