From 9803c269a02755cb0ab381154dfe7caa09686be7 Mon Sep 17 00:00:00 2001 From: "Sankari, Swathi S" Date: Fri, 3 Sep 2021 17:44:18 +0530 Subject: [PATCH 1/4] Tabslistitem molecule action --- .../Atomic/Molecules/HorizontalCombinationViews/Tabs.swift | 6 +++++- MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift index 804075ff..c2df0909 100644 --- a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift +++ b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift @@ -244,7 +244,11 @@ extension Tabs: UICollectionViewDelegateFlowLayout { tabCell.setNeedsDisplay() tabCell.setNeedsLayout() tabCell.layoutIfNeeded() - delegate?.didSelectItem(indexPath, tabs: self) + if let delegate = delegate { + delegate.didSelectItem(indexPath, tabs: self) + } else if let action = tabsModel.tabs[selectedIndex].action { + MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: nil, delegateObject:delegateObject) + } } } diff --git a/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift b/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift index a636b90b..6d49cdfe 100644 --- a/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift +++ b/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift @@ -67,6 +67,9 @@ extension TabsTableViewCell: TabsDelegate { let index = indexPath.row guard let model = tabsListItemModel, index < model.molecules.count else { return } + if let action = model.tabs.tabs[index].action { + MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: nil, delegateObject:delegateObject) + } MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(index < previousTabIndex ? .left : .right), additionalData: [KeySourceModel: model], delegateObject: delegateObject) } } From acbb26bbd82e8093b15b985e3dc773adead977a3 Mon Sep 17 00:00:00 2001 From: "Sankari, Swathi S" Date: Fri, 3 Sep 2021 21:08:49 +0530 Subject: [PATCH 2/4] passing sourcemodel --- .../Atomic/Molecules/HorizontalCombinationViews/Tabs.swift | 2 +- MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift index c2df0909..139a3d06 100644 --- a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift +++ b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift @@ -247,7 +247,7 @@ extension Tabs: UICollectionViewDelegateFlowLayout { if let delegate = delegate { delegate.didSelectItem(indexPath, tabs: self) } else if let action = tabsModel.tabs[selectedIndex].action { - MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: nil, delegateObject:delegateObject) + MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: tabsModel], delegateObject:delegateObject) } } } diff --git a/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift b/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift index 6d49cdfe..7eeffb08 100644 --- a/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift +++ b/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift @@ -68,7 +68,7 @@ extension TabsTableViewCell: TabsDelegate { guard let model = tabsListItemModel, index < model.molecules.count else { return } if let action = model.tabs.tabs[index].action { - MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: nil, delegateObject:delegateObject) + MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: model], delegateObject:delegateObject) } MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(index < previousTabIndex ? .left : .right), additionalData: [KeySourceModel: model], delegateObject: delegateObject) } From 5bfef340f15f4202b8709ec81c97bcc3f859a0ae Mon Sep 17 00:00:00 2001 From: "Sankari, Swathi S" Date: Fri, 3 Sep 2021 21:27:12 +0530 Subject: [PATCH 3/4] passing tabs as sourcemodel --- MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift b/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift index 7eeffb08..d3b91b11 100644 --- a/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift +++ b/MVMCoreUI/Atomic/Molecules/Items/TabsTableViewCell.swift @@ -68,7 +68,7 @@ extension TabsTableViewCell: TabsDelegate { guard let model = tabsListItemModel, index < model.molecules.count else { return } if let action = model.tabs.tabs[index].action { - MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: model], delegateObject:delegateObject) + MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: model.tabs], delegateObject:delegateObject) } MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(index < previousTabIndex ? .left : .right), additionalData: [KeySourceModel: model], delegateObject: delegateObject) } From fe26dae9dcfa2a64cbab986678fed8f238ecddd7 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Tue, 7 Sep 2021 17:25:46 +0000 Subject: [PATCH 4/4] mkdir fix --- Scripts/build_aggregate.sh | 4 +++- Scripts/download_dependencies.sh | 4 ++-- Scripts/download_framework.sh | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 514d0075..e5b007ce 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -1,3 +1,5 @@ +#!/bin/bash -e + unset TOOLCHAINS #Xcode 7.3 BUG FIX http://stackoverflow.com/questions/36184930/xcodebuild-7-3-cant-enable-bitcode # define output folder environment variable @@ -6,7 +8,7 @@ PHONE_CONFIGURATION="Release" SIMULATOR_CONFIGURATION="Debug" BUILD_DIR=$(xcodebuild -showBuildSettings -project ./MVMCoreUI.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework" -FRAMEWORKS_DIR=$BUILD_DIR/Frameworks +FRAMEWORKS_DIR=$BUILD_DIR/../../../Frameworks/MVMCoreUI UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index f03a25e8..10d11351 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -12,10 +12,10 @@ if [ -z $ARTIFACTORY_URL ]; then fi BUILD_DIR=$(xcodebuild -showBuildSettings -project ./MVMCoreUI.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) -FRAMEWORKS_DIR=$BUILD_DIR/Frameworks +FRAMEWORKS_DIR=$BUILD_DIR/../../../Frameworks/MVMCoreUI if [ ! -d $FRAMEWORKS_DIR ]; then - mkdir $FRAMEWORKS_DIR + mkdir -p $FRAMEWORKS_DIR fi ./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index 9e9e2bb5..5d602e0a 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -14,7 +14,7 @@ LOGFILE=$3 LOCALDIR=$(dirname "${LOCALPATH}") LOCALBASE=$(basename "${LOCALPATH}") NEWFILEPATH="${LOCALDIR}"/$(basename "${REMOTEPATH}") -VERSIONFILE=$LOCALDIR/../Checksums/"${LOCALBASE}".txt +VERSIONFILE=$LOCALDIR/Checksums/"${LOCALBASE}".txt if [ -z $URL ]; then echo "The artifactory instance url must be specified as the first argument!"