From 16f925502b8364bc266c53923200dc6d99116a08 Mon Sep 17 00:00:00 2001 From: Nicolas Battelli Date: Thu, 12 Sep 2019 18:02:39 -0300 Subject: [PATCH 1/3] Hago opcional el return de getTitle y getSubtitle en el protocolo MLBusinessDiscountBoxData --- .../project.pbxproj | 53 +++++++++++-------- .../MockData/DiscountData.swift | 4 +- README.md | 4 +- .../Discount/MLBusinessDiscountBoxData.swift | 4 +- 4 files changed, 38 insertions(+), 27 deletions(-) diff --git a/Example/Example_BusinessComponents.xcodeproj/project.pbxproj b/Example/Example_BusinessComponents.xcodeproj/project.pbxproj index 2d02cbf0..61e84364 100644 --- a/Example/Example_BusinessComponents.xcodeproj/project.pbxproj +++ b/Example/Example_BusinessComponents.xcodeproj/project.pbxproj @@ -15,10 +15,11 @@ 23EE407A2326BA33001322EC /* LoyaltyRingData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EE40782326BA33001322EC /* LoyaltyRingData.swift */; }; 23EE407B2326BA33001322EC /* DiscountData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EE40792326BA33001322EC /* DiscountData.swift */; }; 23EE408023297CF8001322EC /* SingleItemData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EE407F23297CF8001322EC /* SingleItemData.swift */; }; - E99F434E604039AF7F22C0FD /* Pods_Example_BusinessComponents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AC9BD9234CC7F04F5B207C7D /* Pods_Example_BusinessComponents.framework */; }; + BB9E26FC3DD45F207D4BB84B /* Pods_Example_BusinessComponents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B8416BFAB081096869A35876 /* Pods_Example_BusinessComponents.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 19F264F7F156FDD46A230BEC /* Pods-Example_BusinessComponents.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example_BusinessComponents.debug.xcconfig"; path = "Target Support Files/Pods-Example_BusinessComponents/Pods-Example_BusinessComponents.debug.xcconfig"; sourceTree = ""; }; 23EE40622326B50B001322EC /* Example_BusinessComponents.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example_BusinessComponents.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23EE40652326B50B001322EC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23EE40672326B50B001322EC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -29,9 +30,8 @@ 23EE40782326BA33001322EC /* LoyaltyRingData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoyaltyRingData.swift; sourceTree = ""; }; 23EE40792326BA33001322EC /* DiscountData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscountData.swift; sourceTree = ""; }; 23EE407F23297CF8001322EC /* SingleItemData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleItemData.swift; sourceTree = ""; }; - 657C38C6E0FC3A48552BE906 /* Pods-Example_BusinessComponents.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example_BusinessComponents.release.xcconfig"; path = "Target Support Files/Pods-Example_BusinessComponents/Pods-Example_BusinessComponents.release.xcconfig"; sourceTree = ""; }; - 6F2F710FC20B0E97CE6DC766 /* Pods-Example_BusinessComponents.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example_BusinessComponents.debug.xcconfig"; path = "Target Support Files/Pods-Example_BusinessComponents/Pods-Example_BusinessComponents.debug.xcconfig"; sourceTree = ""; }; - AC9BD9234CC7F04F5B207C7D /* Pods_Example_BusinessComponents.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example_BusinessComponents.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 403C5DEEFE4FED153174F429 /* Pods-Example_BusinessComponents.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example_BusinessComponents.release.xcconfig"; path = "Target Support Files/Pods-Example_BusinessComponents/Pods-Example_BusinessComponents.release.xcconfig"; sourceTree = ""; }; + B8416BFAB081096869A35876 /* Pods_Example_BusinessComponents.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example_BusinessComponents.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -39,7 +39,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E99F434E604039AF7F22C0FD /* Pods_Example_BusinessComponents.framework in Frameworks */, + BB9E26FC3DD45F207D4BB84B /* Pods_Example_BusinessComponents.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -52,7 +52,7 @@ 23EE40642326B50B001322EC /* Example_BusinessComponents */, 23EE40632326B50B001322EC /* Products */, A59E6EF42ECBD43D00AC3CD0 /* Pods */, - 846C0189AA81324A203EAF44 /* Frameworks */, + E83AAC3739CF352F90FA555C /* Frameworks */, ); sourceTree = ""; }; @@ -88,21 +88,21 @@ path = MockData; sourceTree = ""; }; - 846C0189AA81324A203EAF44 /* Frameworks */ = { + A59E6EF42ECBD43D00AC3CD0 /* Pods */ = { isa = PBXGroup; children = ( - AC9BD9234CC7F04F5B207C7D /* Pods_Example_BusinessComponents.framework */, + 19F264F7F156FDD46A230BEC /* Pods-Example_BusinessComponents.debug.xcconfig */, + 403C5DEEFE4FED153174F429 /* Pods-Example_BusinessComponents.release.xcconfig */, ); - name = Frameworks; + path = Pods; sourceTree = ""; }; - A59E6EF42ECBD43D00AC3CD0 /* Pods */ = { + E83AAC3739CF352F90FA555C /* Frameworks */ = { isa = PBXGroup; children = ( - 6F2F710FC20B0E97CE6DC766 /* Pods-Example_BusinessComponents.debug.xcconfig */, - 657C38C6E0FC3A48552BE906 /* Pods-Example_BusinessComponents.release.xcconfig */, + B8416BFAB081096869A35876 /* Pods_Example_BusinessComponents.framework */, ); - path = Pods; + name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ @@ -112,11 +112,11 @@ isa = PBXNativeTarget; buildConfigurationList = 23EE40742326B50E001322EC /* Build configuration list for PBXNativeTarget "Example_BusinessComponents" */; buildPhases = ( - 2E69FA38780D7FE6A23178F1 /* [CP] Check Pods Manifest.lock */, + 3DAA15763FE130D8800FA644 /* [CP] Check Pods Manifest.lock */, 23EE405E2326B50B001322EC /* Sources */, 23EE405F2326B50B001322EC /* Frameworks */, 23EE40602326B50B001322EC /* Resources */, - FBBF7C1F93C288FEC78C26E2 /* [CP] Embed Pods Frameworks */, + FF5F795D98F5359DB9466B56 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -174,7 +174,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2E69FA38780D7FE6A23178F1 /* [CP] Check Pods Manifest.lock */ = { + 3DAA15763FE130D8800FA644 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -196,17 +196,28 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - FBBF7C1F93C288FEC78C26E2 /* [CP] Embed Pods Frameworks */ = { + FF5F795D98F5359DB9466B56 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Example_BusinessComponents/Pods-Example_BusinessComponents-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Example_BusinessComponents/Pods-Example_BusinessComponents-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/FXBlurView/FXBlurView.framework", + "${BUILT_PRODUCTS_DIR}/JRSwizzle/JRSwizzle.framework", + "${BUILT_PRODUCTS_DIR}/MLBusinessComponents/MLBusinessComponents.framework", + "${BUILT_PRODUCTS_DIR}/MLUI/MLUI.framework", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Example_BusinessComponents/Pods-Example_BusinessComponents-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FXBlurView.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JRSwizzle.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MLBusinessComponents.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MLUI.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -368,7 +379,7 @@ }; 23EE40752326B50E001322EC /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6F2F710FC20B0E97CE6DC766 /* Pods-Example_BusinessComponents.debug.xcconfig */; + baseConfigurationReference = 19F264F7F156FDD46A230BEC /* Pods-Example_BusinessComponents.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Manual; @@ -388,7 +399,7 @@ }; 23EE40762326B50E001322EC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 657C38C6E0FC3A48552BE906 /* Pods-Example_BusinessComponents.release.xcconfig */; + baseConfigurationReference = 403C5DEEFE4FED153174F429 /* Pods-Example_BusinessComponents.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Manual; diff --git a/Example/Example_BusinessComponents/MockData/DiscountData.swift b/Example/Example_BusinessComponents/MockData/DiscountData.swift index 61fd546a..95458274 100644 --- a/Example/Example_BusinessComponents/MockData/DiscountData.swift +++ b/Example/Example_BusinessComponents/MockData/DiscountData.swift @@ -10,11 +10,11 @@ import UIKit import MLBusinessComponents class DiscountData: NSObject, MLBusinessDiscountBoxData { - func getTitle() -> String { + func getTitle() -> String? { return "200 descuentos" } - func getSubtitle() -> String { + func getSubtitle() -> String? { return "por ser nivel 3" } diff --git a/README.md b/README.md index 2f1297ff..5f18e5f8 100644 --- a/README.md +++ b/README.md @@ -150,8 +150,8 @@ This protocol allow you to providade the proper data to draw `MLBusinessDiscount #### Definition ```swift @objc public protocol MLBusinessDiscountBoxData: NSObjectProtocol { - @objc optional func getTitle() -> String - @objc optional func getSubtitle() -> String + @objc optional func getTitle() -> String? + @objc optional func getSubtitle() -> String? @objc func getItems() -> [MLBusinessSingleItemProtocol] } ``` diff --git a/Source/Components/Discount/MLBusinessDiscountBoxData.swift b/Source/Components/Discount/MLBusinessDiscountBoxData.swift index 03abafdc..d425c4b4 100644 --- a/Source/Components/Discount/MLBusinessDiscountBoxData.swift +++ b/Source/Components/Discount/MLBusinessDiscountBoxData.swift @@ -9,7 +9,7 @@ import Foundation @objc public protocol MLBusinessDiscountBoxData: NSObjectProtocol { - @objc optional func getTitle() -> String - @objc optional func getSubtitle() -> String + @objc optional func getTitle() -> String? + @objc optional func getSubtitle() -> String? @objc func getItems() -> [MLBusinessSingleItemProtocol] } From 7d60456cf9209683daef832b5d1fbd9dedb36c50 Mon Sep 17 00:00:00 2001 From: Juan Sanzone Date: Thu, 12 Sep 2019 20:40:41 -0300 Subject: [PATCH 2/3] Update MLBusinessComponents.podspec --- MLBusinessComponents.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLBusinessComponents.podspec b/MLBusinessComponents.podspec index c8dfffb1..535029a9 100644 --- a/MLBusinessComponents.podspec +++ b/MLBusinessComponents.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MLBusinessComponents" - s.version = "1.0" + s.version = "1.0.1" s.summary = "MLBusinessComponents for iOS" s.homepage = "https://www.mercadolibre.com" s.license = { :type => "MIT", :file => "LICENSE" } From 8007708626307ae1d1b82ef55d2fe79d8a70fa37 Mon Sep 17 00:00:00 2001 From: Juan Sanzone Date: Thu, 12 Sep 2019 20:44:09 -0300 Subject: [PATCH 3/3] Create CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..608aa1e5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# v1.0.1 +🚀Improvements Sign of MLBusinessDiscountBoxData 🚀 +- Improvements for MLBusinessDiscountBoxData sign (title and subtitle are optionals) + +# v1.0 +🚀First Release 1.0 🚀 +- DiscountBoxView +- LoyaltyRingView +- Dividing triangle line