diff --git a/Modules/Sources/WooFoundation/Resources/Images.xcassets/Contents.json b/Modules/Sources/WooFoundation/Resources/Images.xcassets/Contents.json new file mode 100644 index 00000000000..73c00596a7f --- /dev/null +++ b/Modules/Sources/WooFoundation/Resources/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/WooCommerce/Resources/Images.xcassets/card-reader-update-progress-arrow.imageset/Contents.json b/Modules/Sources/WooFoundation/Resources/Images.xcassets/card-reader-update-progress-arrow.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/card-reader-update-progress-arrow.imageset/Contents.json rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/card-reader-update-progress-arrow.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/card-reader-update-progress-arrow.imageset/woo-update-progress-arrow.pdf b/Modules/Sources/WooFoundation/Resources/Images.xcassets/card-reader-update-progress-arrow.imageset/woo-update-progress-arrow.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/card-reader-update-progress-arrow.imageset/woo-update-progress-arrow.pdf rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/card-reader-update-progress-arrow.imageset/woo-update-progress-arrow.pdf diff --git a/WooCommerce/Resources/Images.xcassets/card-reader-update-progress-checkmark.imageset/Contents.json b/Modules/Sources/WooFoundation/Resources/Images.xcassets/card-reader-update-progress-checkmark.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/card-reader-update-progress-checkmark.imageset/Contents.json rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/card-reader-update-progress-checkmark.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/card-reader-update-progress-checkmark.imageset/woo-update-progress-checkmark.pdf b/Modules/Sources/WooFoundation/Resources/Images.xcassets/card-reader-update-progress-checkmark.imageset/woo-update-progress-checkmark.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/card-reader-update-progress-checkmark.imageset/woo-update-progress-checkmark.pdf rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/card-reader-update-progress-checkmark.imageset/woo-update-progress-checkmark.pdf diff --git a/WooCommerce/Resources/Images.xcassets/coupons.imageset/Contents.json b/Modules/Sources/WooFoundation/Resources/Images.xcassets/coupons.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/coupons.imageset/Contents.json rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/coupons.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/coupons.imageset/coupons-dark.pdf b/Modules/Sources/WooFoundation/Resources/Images.xcassets/coupons.imageset/coupons-dark.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/coupons.imageset/coupons-dark.pdf rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/coupons.imageset/coupons-dark.pdf diff --git a/WooCommerce/Resources/Images.xcassets/coupons.imageset/coupons-light.pdf b/Modules/Sources/WooFoundation/Resources/Images.xcassets/coupons.imageset/coupons-light.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/coupons.imageset/coupons-light.pdf rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/coupons.imageset/coupons-light.pdf diff --git a/WooCommerce/Resources/Images.xcassets/location.imageset/Contents.json b/Modules/Sources/WooFoundation/Resources/Images.xcassets/location.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/location.imageset/Contents.json rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/location.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/location.imageset/location-dark.pdf b/Modules/Sources/WooFoundation/Resources/Images.xcassets/location.imageset/location-dark.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/location.imageset/location-dark.pdf rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/location.imageset/location-dark.pdf diff --git a/WooCommerce/Resources/Images.xcassets/location.imageset/location-light.pdf b/Modules/Sources/WooFoundation/Resources/Images.xcassets/location.imageset/location-light.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/location.imageset/location-light.pdf rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/location.imageset/location-light.pdf diff --git a/WooCommerce/Resources/Images.xcassets/shopping-bags.imageset/Contents.json b/Modules/Sources/WooFoundation/Resources/Images.xcassets/shopping-bags.imageset/Contents.json similarity index 100% rename from WooCommerce/Resources/Images.xcassets/shopping-bags.imageset/Contents.json rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/shopping-bags.imageset/Contents.json diff --git a/WooCommerce/Resources/Images.xcassets/shopping-bags.imageset/Shopping bags.pdf b/Modules/Sources/WooFoundation/Resources/Images.xcassets/shopping-bags.imageset/Shopping bags.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/shopping-bags.imageset/Shopping bags.pdf rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/shopping-bags.imageset/Shopping bags.pdf diff --git a/WooCommerce/Resources/Images.xcassets/shopping-bags.imageset/shopping-bags.pdf b/Modules/Sources/WooFoundation/Resources/Images.xcassets/shopping-bags.imageset/shopping-bags.pdf similarity index 100% rename from WooCommerce/Resources/Images.xcassets/shopping-bags.imageset/shopping-bags.pdf rename to Modules/Sources/WooFoundation/Resources/Images.xcassets/shopping-bags.imageset/shopping-bags.pdf diff --git a/Modules/Sources/WooFoundation/Utilities/SharedImageAsset.swift b/Modules/Sources/WooFoundation/Utilities/SharedImageAsset.swift new file mode 100644 index 00000000000..ade29ae3024 --- /dev/null +++ b/Modules/Sources/WooFoundation/Utilities/SharedImageAsset.swift @@ -0,0 +1,37 @@ +import Foundation +import SwiftUI + +public enum SharedImageAsset: CaseIterable { + case cardReaderUpdateProgressArrow + case cardReaderUpdateProgressCheckmark + case coupons + case location + case shoppingBags + + public var image: Image { + Image(imageName, bundle: .module) + } + + public var decorativeImage: Image { + Image(decorative: imageName, bundle: .module) + } + + public var uiImage: UIImage? { + UIImage(named: imageName, in: .module, compatibleWith: nil) + } + + private var imageName: String { + switch self { + case .cardReaderUpdateProgressArrow: + "card-reader-update-progress-arrow" + case .cardReaderUpdateProgressCheckmark: + "card-reader-update-progress-checkmark" + case .coupons: + "coupons" + case .location: + "location" + case .shoppingBags: + "shopping-bags" + } + } +} diff --git a/WooCommerce/Classes/Extensions/UIImage+Woo.swift b/WooCommerce/Classes/Extensions/UIImage+Woo.swift index c9827e7fd9f..05bb88c2f22 100644 --- a/WooCommerce/Classes/Extensions/UIImage+Woo.swift +++ b/WooCommerce/Classes/Extensions/UIImage+Woo.swift @@ -1,6 +1,7 @@ import Foundation import UIKit import Gridicons +import WooFoundation /// WooCommerce UIImage Assets @@ -327,7 +328,7 @@ extension UIImage { /// Coupons Image /// static var couponsImage: UIImage { - return UIImage(named: "coupons")! + SharedImageAsset.coupons.uiImage! } /// Empty Inbox Notes Icon @@ -355,7 +356,7 @@ extension UIImage { } static var shoppingBagsImage: UIImage { - UIImage(named: "shopping-bags")! + SharedImageAsset.shoppingBags.uiImage! } /// Image showing boxes @@ -675,13 +676,13 @@ extension UIImage { /// Card Reader Update arrow /// static var cardReaderUpdateProgressArrow: UIImage { - return UIImage(named: "card-reader-update-progress-arrow")! + SharedImageAsset.cardReaderUpdateProgressArrow.uiImage! } /// Card Reader Update checkmark /// static var cardReaderUpdateProgressCheckmark: UIImage { - return UIImage(named: "card-reader-update-progress-checkmark")! + SharedImageAsset.cardReaderUpdateProgressCheckmark.uiImage! } /// Card Reader Low Battery @@ -1369,7 +1370,7 @@ extension UIImage { } static var cardReaderLocationImage: UIImage { - UIImage(named: "location")! + SharedImageAsset.location.uiImage! } } diff --git a/WooCommerce/Classes/POS/Extensions/UIImage+POS.swift b/WooCommerce/Classes/POS/Extensions/UIImage+POS.swift deleted file mode 100644 index 5739d3b67af..00000000000 --- a/WooCommerce/Classes/POS/Extensions/UIImage+POS.swift +++ /dev/null @@ -1,18 +0,0 @@ -import UIKit - -/// Point of Sale specific UIImage extensions -/// Contains only the UIImage extensions needed by the POS module to minimize external dependencies -extension UIImage { - - /// Card Reader Update arrow - used in reader update progress - /// - static var posCardReaderUpdateProgressArrow: UIImage { - return UIImage(named: "card-reader-update-progress-arrow", in: .main, compatibleWith: nil)! - } - - /// Card Reader Update checkmark - used in reader update progress completion - /// - static var posCardReaderUpdateProgressCheckmark: UIImage { - return UIImage(named: "card-reader-update-progress-checkmark", in: .main, compatibleWith: nil)! - } -} diff --git a/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertViewModel.swift b/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertViewModel.swift index 6521b40a287..032e05abd4a 100644 --- a/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertViewModel.swift +++ b/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertViewModel.swift @@ -4,7 +4,6 @@ import SwiftUI struct PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertViewModel: Hashable { let title = Localization.title let subtitle = Localization.subtitle - let imageName = PointOfSaleAssets.readerLocation.imageName let primaryButtonViewModel: CardPresentPaymentsModalButtonViewModel let cancelButtonViewModel: CardPresentPaymentsModalButtonViewModel diff --git a/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentConnectingLocationPreAlertViewModel.swift b/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentConnectingLocationPreAlertViewModel.swift index 48e8ead39e2..042dcea8831 100644 --- a/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentConnectingLocationPreAlertViewModel.swift +++ b/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentConnectingLocationPreAlertViewModel.swift @@ -5,7 +5,6 @@ struct PointOfSaleCardPresentPaymentConnectingLocationPreAlertViewModel: Hashabl let title = Localization.title let subtitle = Localization.subtitle let detail = Localization.settings - let imageName = PointOfSaleAssets.readerLocation.imageName let primaryButtonViewModel: CardPresentPaymentsModalButtonViewModel diff --git a/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentReaderUpdateProgressView.swift b/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentReaderUpdateProgressView.swift index 450530284b3..11a9c5839e7 100644 --- a/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentReaderUpdateProgressView.swift +++ b/WooCommerce/Classes/POS/Presentation/Card Present Payments/Connection Alerts/PointOfSaleCardPresentPaymentReaderUpdateProgressView.swift @@ -1,4 +1,5 @@ import SwiftUI +import WooFoundation struct PointOfSaleCardPresentPaymentReaderUpdateProgressView: View { let progress: CGFloat @@ -19,7 +20,9 @@ struct PointOfSaleCardPresentPaymentReaderUpdateProgressView: View { ) .animation(.easeOut(duration: 0.2), value: progress) - Image(uiImage: isComplete ? .posCardReaderUpdateProgressCheckmark : .posCardReaderUpdateProgressArrow) + ( + isComplete ? SharedImageAsset.cardReaderUpdateProgressCheckmark.decorativeImage : SharedImageAsset.cardReaderUpdateProgressArrow.decorativeImage + ) .renderingMode(.template) .foregroundColor(Color(.posOnPrimary)) } diff --git a/WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Connection Alerts/PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertView.swift b/WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Connection Alerts/PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertView.swift index d6ba59446ef..a8cb8bf3cab 100644 --- a/WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Connection Alerts/PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertView.swift +++ b/WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Connection Alerts/PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertView.swift @@ -1,4 +1,5 @@ import SwiftUI +import WooFoundation struct PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertView: View { let viewModel: PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertViewModel @@ -7,7 +8,7 @@ struct PointOfSaleCardPresentPaymentConnectingFailedLocationRequiredAlertView: V var body: some View { VStack(spacing: PointOfSaleReaderConnectionModalLayout.contentButtonSpacing) { VStack(spacing: PointOfSaleReaderConnectionModalLayout.imageTextSpacing) { - Image(decorative: viewModel.imageName) + SharedImageAsset.location.image .matchedGeometryEffect(id: animation.iconTransitionId, in: animation.namespace, properties: .position) VStack(spacing: PointOfSaleReaderConnectionModalLayout.textSpacing) { diff --git a/WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Connection Alerts/PointOfSaleCardPresentPaymentConnectingLocationPreAlertView.swift b/WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Connection Alerts/PointOfSaleCardPresentPaymentConnectingLocationPreAlertView.swift index 441218bdbbb..d72d506dade 100644 --- a/WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Connection Alerts/PointOfSaleCardPresentPaymentConnectingLocationPreAlertView.swift +++ b/WooCommerce/Classes/POS/Presentation/CardReaderConnection/UI States/Connection Alerts/PointOfSaleCardPresentPaymentConnectingLocationPreAlertView.swift @@ -1,4 +1,5 @@ import SwiftUI +import WooFoundation struct PointOfSaleCardPresentPaymentConnectingLocationPreAlertView: View { let viewModel: PointOfSaleCardPresentPaymentConnectingLocationPreAlertViewModel @@ -7,7 +8,7 @@ struct PointOfSaleCardPresentPaymentConnectingLocationPreAlertView: View { var body: some View { VStack(spacing: PointOfSaleReaderConnectionModalLayout.contentButtonSpacing) { VStack(spacing: PointOfSaleReaderConnectionModalLayout.imageTextSpacing) { - Image(decorative: viewModel.imageName) + SharedImageAsset.location.decorativeImage .matchedGeometryEffect(id: animation.iconTransitionId, in: animation.namespace, properties: .position) VStack(spacing: PointOfSaleReaderConnectionModalLayout.textSpacing) { diff --git a/WooCommerce/Classes/POS/Presentation/CartView.swift b/WooCommerce/Classes/POS/Presentation/CartView.swift index cb21eb37805..2b76ed39e77 100644 --- a/WooCommerce/Classes/POS/Presentation/CartView.swift +++ b/WooCommerce/Classes/POS/Presentation/CartView.swift @@ -211,7 +211,7 @@ private extension CartView { .foregroundColor(Color.posOnSurfaceVariantLowest) .multilineTextAlignment(.center) .overlay(alignment: .top) { - Image(decorative: PointOfSaleAssets.shoppingBags.imageName) + SharedImageAsset.shoppingBags.decorativeImage .resizable() .frame(width: Constants.shoppingBagImageSize, height: Constants.shoppingBagImageSize, alignment: .bottom) .offset(y: -(Constants.shoppingBagImageSize + Constants.emptyViewImageTextSpacing)) diff --git a/WooCommerce/Classes/POS/Presentation/Orders/POSOrderListEmptyViewModel.swift b/WooCommerce/Classes/POS/Presentation/Orders/POSOrderListEmptyViewModel.swift index e773785c34d..c2e2693bbfb 100644 --- a/WooCommerce/Classes/POS/Presentation/Orders/POSOrderListEmptyViewModel.swift +++ b/WooCommerce/Classes/POS/Presentation/Orders/POSOrderListEmptyViewModel.swift @@ -1,4 +1,5 @@ import Foundation +import SwiftUI struct POSOrderListEmptyViewModel: POSListEmptyViewModelProtocol { let isSearching: Bool @@ -19,8 +20,8 @@ struct POSOrderListEmptyViewModel: POSListEmptyViewModelProtocol { isSearching ? nil : Localization.emptyOrdersButtonTitle } - var iconName: String { - PointOfSaleAssets.magnifierNotFound.imageName + var icon: Image { + PointOfSaleAssets.magnifierNotFound.decorativeImage } } diff --git a/WooCommerce/Classes/POS/Presentation/PointOfSaleAssets.swift b/WooCommerce/Classes/POS/Presentation/PointOfSaleAssets.swift index 4c8070ad7f0..9bca8d6e13c 100644 --- a/WooCommerce/Classes/POS/Presentation/PointOfSaleAssets.swift +++ b/WooCommerce/Classes/POS/Presentation/PointOfSaleAssets.swift @@ -1,4 +1,5 @@ import Foundation +import SwiftUI enum PointOfSaleAssets: CaseIterable { case error @@ -10,10 +11,7 @@ enum PointOfSaleAssets: CaseIterable { case readerConnectionLowBattery case readerConnectionSuccess case readerDisconnected - case readerLocation - case shoppingBags case successCheck - case coupons case gears case barcodeFieldScreenshot case starBsh20SetupBarcode @@ -23,6 +21,10 @@ enum PointOfSaleAssets: CaseIterable { case netum1228BCPairBarcode case testEan13Barcode + var decorativeImage: Image { + Image(decorative: imageName) + } + var imageName: String { switch self { case .error: @@ -43,14 +45,8 @@ enum PointOfSaleAssets: CaseIterable { "pos-reader-connection-complete" case .readerDisconnected: "pos-reader-disconnected" - case .readerLocation: - "location" - case .shoppingBags: - "shopping-bags" case .successCheck: "pos-success-check" - case .coupons: - "coupons" case .gears: "pos-gears" case .barcodeFieldScreenshot: diff --git a/WooCommerce/Classes/POS/Presentation/Reusable Views/POSListEmptyView.swift b/WooCommerce/Classes/POS/Presentation/Reusable Views/POSListEmptyView.swift index f7e0e21fd21..496606da323 100644 --- a/WooCommerce/Classes/POS/Presentation/Reusable Views/POSListEmptyView.swift +++ b/WooCommerce/Classes/POS/Presentation/Reusable Views/POSListEmptyView.swift @@ -1,12 +1,12 @@ import SwiftUI -import struct WooFoundation.ScrollableVStack +import WooFoundation protocol POSListEmptyViewModelProtocol { var title: String { get } var subtitle: String { get } var hint: String? { get } var buttonTitle: String? { get } - var iconName: String { get } + var icon: Image { get } } struct POSListEmptyView: View { @@ -85,7 +85,7 @@ struct POSListEmptyView: View { @ViewBuilder private var icon: some View { - Image(decorative: viewModel.iconName) + viewModel.icon .resizable() .aspectRatio(contentMode: .fit) .frame(width: Constants.iconSize, height: Constants.iconSize) @@ -166,12 +166,12 @@ struct POSListEmptyViewModel: POSListEmptyViewModelProtocol { } } - var iconName: String { + var icon: Image { switch itemListType { case .coupons(search: false): - PointOfSaleAssets.coupons.imageName + SharedImageAsset.coupons.decorativeImage default: - PointOfSaleAssets.magnifierNotFound.imageName + PointOfSaleAssets.magnifierNotFound.decorativeImage } } diff --git a/WooCommerce/Classes/POS/Presentation/Reusable Views/POSListErrorView.swift b/WooCommerce/Classes/POS/Presentation/Reusable Views/POSListErrorView.swift index 20e94091555..691834aa904 100644 --- a/WooCommerce/Classes/POS/Presentation/Reusable Views/POSListErrorView.swift +++ b/WooCommerce/Classes/POS/Presentation/Reusable Views/POSListErrorView.swift @@ -1,10 +1,10 @@ import SwiftUI -import struct WooFoundation.ScrollableVStack +import WooFoundation /// A view that displays an error message with a retry CTA when the list of POS items fails to load. struct POSListErrorView: View { @Environment(\.floatingControlAreaSize) private var floatingControlAreaSize: CGSize - private let viewModel: POSListErrorViewModell + private let viewModel: POSListErrorViewModel private let onAction: (() -> Void)? @State private var viewWidth: CGFloat = 0 @@ -12,7 +12,7 @@ struct POSListErrorView: View { @Environment(\.keyboardObserver) private var keyboard init(error: PointOfSaleErrorState, onAction: (() -> Void)? = nil) { - self.viewModel = POSListErrorViewModell(error: error) + self.viewModel = POSListErrorViewModel(error: error) self.onAction = onAction } @@ -21,8 +21,8 @@ struct POSListErrorView: View { Spacer() VStack(alignment: .center, spacing: POSSpacing.none) { if !keyboard.isFullSizeKeyboardVisible { - if let imageName = viewModel.imageAsset?.imageName { - Image(decorative: imageName) + if let image = viewModel.imageAsset { + image .resizable() .aspectRatio(contentMode: .fit) .frame(width: 88, height: 88) @@ -68,11 +68,11 @@ struct POSListErrorView: View { } } -struct POSListErrorViewModell { +struct POSListErrorViewModel { let title: String let subtitle: String let buttonText: String - let imageAsset: PointOfSaleAssets? + let imageAsset: Image? init(error: PointOfSaleErrorState) { self.title = error.title @@ -80,7 +80,7 @@ struct POSListErrorViewModell { self.buttonText = error.buttonText switch error.errorType { case .couponsDisabled: - self.imageAsset = PointOfSaleAssets.coupons + self.imageAsset = SharedImageAsset.coupons.decorativeImage default: self.imageAsset = nil } diff --git a/WooCommerce/WooCommerce.xcodeproj/project.pbxproj b/WooCommerce/WooCommerce.xcodeproj/project.pbxproj index b3838caad63..f4b93cb428d 100644 --- a/WooCommerce/WooCommerce.xcodeproj/project.pbxproj +++ b/WooCommerce/WooCommerce.xcodeproj/project.pbxproj @@ -57,7 +57,6 @@ 01620C4E2C5394B200D3EA2F /* POSProgressViewStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01620C4D2C5394B200D3EA2F /* POSProgressViewStyle.swift */; }; 01654EB12E786223001DBB6F /* POSServiceLocatorAdaptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01654EAF2E786223001DBB6F /* POSServiceLocatorAdaptor.swift */; }; 01654EB62E78641B001DBB6F /* WooAnalyticsEvent+WooApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01654EB52E78641B001DBB6F /* WooAnalyticsEvent+WooApp.swift */; }; - 016582C92E786840001DBB6F /* UIImage+POS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 016582C72E786840001DBB6F /* UIImage+POS.swift */; }; 016582D62E78715B001DBB6F /* CardPresentPaymentBluetoothReaderConnectionAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 016582CA2E78715B001DBB6F /* CardPresentPaymentBluetoothReaderConnectionAlertsProvider.swift */; }; 016582D72E78715B001DBB6F /* CardPresentPaymentsTransactionAlertsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 016582D22E78715B001DBB6F /* CardPresentPaymentsTransactionAlertsProvider.swift */; }; 016582D82E78715B001DBB6F /* POSCollectOrderPaymentAnalyticsAdaptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 016582D52E78715B001DBB6F /* POSCollectOrderPaymentAnalyticsAdaptor.swift */; }; @@ -3283,7 +3282,6 @@ 01620C4D2C5394B200D3EA2F /* POSProgressViewStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = POSProgressViewStyle.swift; sourceTree = ""; }; 01654EAF2E786223001DBB6F /* POSServiceLocatorAdaptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = POSServiceLocatorAdaptor.swift; sourceTree = ""; }; 01654EB52E78641B001DBB6F /* WooAnalyticsEvent+WooApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WooAnalyticsEvent+WooApp.swift"; sourceTree = ""; }; - 016582C72E786840001DBB6F /* UIImage+POS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+POS.swift"; sourceTree = ""; }; 016582CA2E78715B001DBB6F /* CardPresentPaymentBluetoothReaderConnectionAlertsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentPaymentBluetoothReaderConnectionAlertsProvider.swift; sourceTree = ""; }; 016582CB2E78715B001DBB6F /* CardPresentPaymentCollectOrderPaymentUseCaseAdaptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentPaymentCollectOrderPaymentUseCaseAdaptor.swift; sourceTree = ""; }; 016582CC2E78715B001DBB6F /* CardPresentPaymentInvalidatablePaymentOrchestrator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardPresentPaymentInvalidatablePaymentOrchestrator.swift; sourceTree = ""; }; @@ -6577,7 +6575,6 @@ 016582C82E786840001DBB6F /* Extensions */ = { isa = PBXGroup; children = ( - 016582C72E786840001DBB6F /* UIImage+POS.swift */, 01BE93FF2DDCB1110063541C /* Error+Connectivity.swift */, ); path = Extensions; @@ -15683,7 +15680,6 @@ 024DF32123744798006658FE /* AztecFormatBarCommandCoordinator.swift in Sources */, 689F291A2DE4557E004DF52B /* POSStockFormatter.swift in Sources */, B5AA7B3F20ED81C2004DA14F /* UserDefaults+Woo.swift in Sources */, - 016582C92E786840001DBB6F /* UIImage+POS.swift in Sources */, DED0392B2BC7A076005D0571 /* StorePerformanceViewModel.swift in Sources */, 318477E527A33C650058C7E9 /* CardPresentModalConnectingFailedChargeReader.swift in Sources */, CEEF742A2B9A02EB00B03948 /* OrdersReportCardViewModel.swift in Sources */, diff --git a/WooCommerce/WooCommerceTests/Extensions/IconsTests.swift b/WooCommerce/WooCommerceTests/Extensions/IconsTests.swift index 8d686bf5bd0..886eafecc12 100644 --- a/WooCommerce/WooCommerceTests/Extensions/IconsTests.swift +++ b/WooCommerce/WooCommerceTests/Extensions/IconsTests.swift @@ -824,4 +824,8 @@ final class IconsTests: XCTestCase { func test_wooShippingRatesPlaceholder_is_not_nil() { XCTAssertNotNil(UIImage.wooShippingRatesPlaceholder) } + + func test_shoppingBagsImage_is_not_nil() { + XCTAssertNotNil(UIImage.shoppingBagsImage) + } }