From 7a20984a7782cbc1651ccad964e454ef68bf1ba5 Mon Sep 17 00:00:00 2001 From: Manish Date: Sun, 28 Apr 2019 11:01:32 +0800 Subject: [PATCH 1/2] Support for swift 5.0 --- .../project.pbxproj | 16 ++++++++++------ .../BaseButton/RadioCheckboxBaseContainer.swift | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/RadioAndCheckboxButtonDemo.xcodeproj/project.pbxproj b/RadioAndCheckboxButtonDemo.xcodeproj/project.pbxproj index 936c645..4e64aaf 100644 --- a/RadioAndCheckboxButtonDemo.xcodeproj/project.pbxproj +++ b/RadioAndCheckboxButtonDemo.xcodeproj/project.pbxproj @@ -170,8 +170,8 @@ TargetAttributes = { 130845392005D8B100C96F1C = { CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1010; - ProvisioningStyle = Automatic; + LastSwiftMigration = 1020; + ProvisioningStyle = Manual; }; }; }; @@ -367,13 +367,15 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = RadioAndCheckboxButtonDemo/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.swifty.ios.radiocheckboxDemo; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -382,13 +384,15 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = RadioAndCheckboxButtonDemo/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.swifty.ios.radiocheckboxDemo; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Source/BaseButton/RadioCheckboxBaseContainer.swift b/Source/BaseButton/RadioCheckboxBaseContainer.swift index 10f6dff..3ae5950 100644 --- a/Source/BaseButton/RadioCheckboxBaseContainer.swift +++ b/Source/BaseButton/RadioCheckboxBaseContainer.swift @@ -99,7 +99,7 @@ public class RadioCheckboxBaseContainer where T: RadioCheckboxBaseButton { /// - Returns: Bool @discardableResult public func removeButton(_ button: T) -> Bool { - guard let index = buttonContainer.index(where: { $0.value == button }) else { + guard let index = buttonContainer.firstIndex(where: { $0.value == button }) else { return false } buttonContainer.remove(at: index) From 6726a18ff97e0ccfa4e3e910a3fcffd4b3d81797 Mon Sep 17 00:00:00 2001 From: Manish Date: Sun, 28 Apr 2019 11:04:16 +0800 Subject: [PATCH 2/2] pod file updated --- MBCheckboxButton.podspec | 11 ----------- MBRadioButton.podspec | 11 ----------- MBRadioCheckboxButton.podspec | 2 +- RadioAndCheckboxButtonDemo/Info.plist | 4 ++-- 4 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 MBCheckboxButton.podspec delete mode 100644 MBRadioButton.podspec diff --git a/MBCheckboxButton.podspec b/MBCheckboxButton.podspec deleted file mode 100644 index 21dc23c..0000000 --- a/MBCheckboxButton.podspec +++ /dev/null @@ -1,11 +0,0 @@ -Pod::Spec.new do |s| - s.name = "MBCheckboxButton" - s.version = "1.4" - s.summary = "MBCheckboxButton help you create Checkbox button without single line of code. It also help you group the Checkbox buttons. It gives animation effect and customization." - s.homepage = "https://github.com/swifty-iOS/RadioCheckboxButton" - s.license = "MIT" - s.author = { "Swifty-iOS" => "manishej004@gmail.com" } - s.ios.deployment_target = "9.0" - s.source = { :git => "https://github.com/swifty-iOS/RadioCheckboxButton.git", :tag =>s.version } - s.source_files = "Source/BaseButton/*.*", "Source/CheckboxButton/*.*" -end \ No newline at end of file diff --git a/MBRadioButton.podspec b/MBRadioButton.podspec deleted file mode 100644 index d5a8d96..0000000 --- a/MBRadioButton.podspec +++ /dev/null @@ -1,11 +0,0 @@ -Pod::Spec.new do |s| - s.name = "MBRadioButton" - s.version = "1.4" - s.summary = "MBRadioButton help you create Radio button without a single line of code. It also help you group the Radio buttons for single selection effect. It gives animation effect and customization." - s.homepage = "https://github.com/swifty-iOS/RadioCheckboxButton" - s.license = "MIT" - s.author = { "Swifty-iOS" => "manishej004@gmail.com" } - s.ios.deployment_target = "9.0" - s.source = { :git => "https://github.com/swifty-iOS/RadioCheckboxButton.git", :tag =>s.version } - s.source_files = "Source/BaseButton/*.*", "Source/RadioButton/*.*" -end \ No newline at end of file diff --git a/MBRadioCheckboxButton.podspec b/MBRadioCheckboxButton.podspec index 864dc7a..5c7e07f 100644 --- a/MBRadioCheckboxButton.podspec +++ b/MBRadioCheckboxButton.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MBRadioCheckboxButton" - s.version = "1.4" + s.version = "2.0" s.summary = "MBRadioCheckboxButton help you create Radio and Checkbox button without a single line of code. It also help you group the Radio or Checkbox buttons. It gives animation effects and customization." s.homepage = "https://github.com/swifty-iOS/RadioCheckboxButton" s.license = "MIT" diff --git a/RadioAndCheckboxButtonDemo/Info.plist b/RadioAndCheckboxButtonDemo/Info.plist index 19a8fa6..f5d20fe 100644 --- a/RadioAndCheckboxButtonDemo/Info.plist +++ b/RadioAndCheckboxButtonDemo/Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4 + 2.0 CFBundleVersion - 5 + 6 LSRequiresIPhoneOS UILaunchStoryboardName