diff --git a/AdyenPSP/AdyenThreeDSecureUtils.swift b/AdyenPSP/AdyenThreeDSecureUtils.swift index 6ca72b8d9..f549d8206 100644 --- a/AdyenPSP/AdyenThreeDSecureUtils.swift +++ b/AdyenPSP/AdyenThreeDSecureUtils.swift @@ -12,7 +12,7 @@ public struct AdyenThreeDSecureUtils: ThreeDSecureUtils { public init() {} public var userAgent: String { - "KH/UISDK/iOS/1.9.0" //\(KarhooUISDKVersionNumber)" + "KH/UISDK/iOS/1.9.1" //\(KarhooUISDKVersionNumber)" } public var acceptHeader = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" diff --git a/ClientSPM/ClientSPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ClientSPM/ClientSPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f3a3c8af2..3043ed026 100644 --- a/ClientSPM/ClientSPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ClientSPM/ClientSPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -55,22 +55,13 @@ "version": "5.6.3" } }, - { - "package": "FloatingPanel", - "repositoryURL": "https://github.com/scenee/FloatingPanel", - "state": { - "branch": null, - "revision": "9b1cb68f0a0f44fb726835d95f6079d94a408af7", - "version": "2.0.1" - } - }, { "package": "KarhooSDK", "repositoryURL": "https://github.com/karhoo/karhoo-ios-sdk", "state": { "branch": null, - "revision": "e8e4bbd9280f8fb5771a819b57624399f966371e", - "version": "1.6.2" + "revision": "f7f6c655b734aee8d47bc44dbd3967aa09bc68bf", + "version": "1.6.3" } }, { diff --git a/KarhooUISDK.podspec b/KarhooUISDK.podspec index 8bc161dc2..339930240 100644 --- a/KarhooUISDK.podspec +++ b/KarhooUISDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "KarhooUISDK" - s.version = "1.9.0" + s.version = "1.9.1" s.summary = "Karhoo UI SDK" s.homepage = "https://developer.karhoo.com/docs/build-apps-using-sdks" s.license = 'BSD 2-Clause' @@ -14,7 +14,6 @@ Pod::Spec.new do |s| s.subspec 'Core' do |core| core.dependency 'KarhooSDK' - core.dependency 'FloatingPanel', '2.0.1' core.dependency 'PhoneNumberKit', '3.3.1' core.source_files = 'KarhooUISDK/**/*.swift' core.exclude_files = 'KarhooUISDK/Extensions/Bundle+extensions/BundleSPM+current.swift' diff --git a/KarhooUISDK.xcodeproj/project.pbxproj b/KarhooUISDK.xcodeproj/project.pbxproj index 34b482d7b..f93d4d11b 100644 --- a/KarhooUISDK.xcodeproj/project.pbxproj +++ b/KarhooUISDK.xcodeproj/project.pbxproj @@ -340,7 +340,6 @@ 40FE0CED22D7D2D4003F65B5 /* RateButtonViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40FE0CEC22D7D2D4003F65B5 /* RateButtonViewModel.swift */; }; 40FE0CF022D7D31A003F65B5 /* KarhooRatingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40FE0CEF22D7D31A003F65B5 /* KarhooRatingView.swift */; }; 40FE0CF222D7D333003F65B5 /* KarhooRatingPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40FE0CF122D7D333003F65B5 /* KarhooRatingPresenter.swift */; }; - 4F861952DAF7F4C86C020496 /* Pods_KarhooUISDK_KarhooUISDKTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C7F5D9A2B1DE827AD262C2F /* Pods_KarhooUISDK_KarhooUISDKTests.framework */; }; 510522E8284F43CE001DA60F /* (null) in Sources */ = {isa = PBXBuildFile; }; 510522E9284F43CE001DA60F /* (null) in Sources */ = {isa = PBXBuildFile; }; 510522EA284F43CE001DA60F /* (null) in Sources */ = {isa = PBXBuildFile; }; @@ -539,6 +538,7 @@ D88BC2862620C51C00F1EA60 /* TimeFormatterSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88BC2852620C51C00F1EA60 /* TimeFormatterSpec.swift */; }; D8D8ED2A261F1FDA0061066D /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = D8D8ED2D261F1FDA0061066D /* Localizable.stringsdict */; }; D8D8ED2B261F1FDA0061066D /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = D8D8ED2D261F1FDA0061066D /* Localizable.stringsdict */; }; + E7924B697A641DB730B96B58 /* Pods_KarhooUISDKTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2982506C7B50F0D6BE25CAA8 /* Pods_KarhooUISDKTests.framework */; }; FC046595221484E2004E76FE /* RideDetailsScreenBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC046594221484E2004E76FE /* RideDetailsScreenBuilder.swift */; }; FC04659F2215A6AD004E76FE /* Navigation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC04659E2215A6AD004E76FE /* Navigation.swift */; }; FC0465A12215A962004E76FE /* UINavigation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC0465A02215A962004E76FE /* UINavigation.swift */; }; @@ -802,6 +802,7 @@ 23391EAB22C65525007D704E /* AddressCellViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddressCellViewModel.swift; sourceTree = ""; }; 2396A2AA255566DC007BD9E1 /* JourneyInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JourneyInfo.swift; sourceTree = ""; }; 27C2AFC742113F1AA9E0101A /* Pods-Client.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Client.debug.xcconfig"; path = "Target Support Files/Pods-Client/Pods-Client.debug.xcconfig"; sourceTree = ""; }; + 2982506C7B50F0D6BE25CAA8 /* Pods_KarhooUISDKTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KarhooUISDKTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 400BE99122CF4D27002942CC /* KarhooAddPaymentPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KarhooAddPaymentPresenter.swift; sourceTree = ""; }; 4010B0D92458847500E7B0F1 /* KarhooTextInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KarhooTextInputView.swift; sourceTree = ""; }; 4010B0DB245C5DD900E7B0F1 /* KarhooInputViewState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KarhooInputViewState.swift; sourceTree = ""; }; @@ -898,7 +899,6 @@ 40FE0CEC22D7D2D4003F65B5 /* RateButtonViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RateButtonViewModel.swift; sourceTree = ""; }; 40FE0CEF22D7D31A003F65B5 /* KarhooRatingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KarhooRatingView.swift; sourceTree = ""; }; 40FE0CF122D7D333003F65B5 /* KarhooRatingPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KarhooRatingPresenter.swift; sourceTree = ""; }; - 4C7F5D9A2B1DE827AD262C2F /* Pods_KarhooUISDK_KarhooUISDKTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KarhooUISDK_KarhooUISDKTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 511A0A60283559A300D119E0 /* PaymentManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentManager.swift; sourceTree = ""; }; 512AD7222859ED3D00888F60 /* MockQuoteListView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockQuoteListView.swift; sourceTree = ""; }; 512AD7242859ED7700888F60 /* QuoteListFilterSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuoteListFilterSpec.swift; sourceTree = ""; }; @@ -986,6 +986,7 @@ 51F614D62860EA2200A7EC11 /* FilterViewBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterViewBuilder.swift; sourceTree = ""; }; 51F614D82861B5BB00A7EC11 /* NumericFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumericFilterView.swift; sourceTree = ""; }; 51F614DA2861B5DE00A7EC11 /* FilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterView.swift; sourceTree = ""; }; + 5BDB2D31A5FE6ABE54D2CAD5 /* Pods-KarhooUISDKTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KarhooUISDKTests.debug.xcconfig"; path = "Target Support Files/Pods-KarhooUISDKTests/Pods-KarhooUISDKTests.debug.xcconfig"; sourceTree = ""; }; 5C1CD0A1241A5D88004AFF7D /* TripOptionsViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TripOptionsViewModel.swift; sourceTree = ""; }; 5C1CD0A3241A5D88004AFF7D /* KarhooTripOptionsPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KarhooTripOptionsPresenter.swift; sourceTree = ""; }; 5C1CD0A4241A5D88004AFF7D /* TripOptionsMVP.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TripOptionsMVP.swift; sourceTree = ""; }; @@ -1112,6 +1113,7 @@ B7CFAC57EF789B924ED2205D /* Pods-KarhooUISDK.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KarhooUISDK.debug.xcconfig"; path = "Target Support Files/Pods-KarhooUISDK/Pods-KarhooUISDK.debug.xcconfig"; sourceTree = ""; }; BA1B3102F7FC60181D4E1B93 /* Pods-KarhooUISDK-KarhooUISDKTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KarhooUISDK-KarhooUISDKTests.debug.xcconfig"; path = "Target Support Files/Pods-KarhooUISDK-KarhooUISDKTests/Pods-KarhooUISDK-KarhooUISDKTests.debug.xcconfig"; sourceTree = ""; }; C652E366D739CC18F36FA302 /* Pods_KarhooUISDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KarhooUISDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CF3BD98C77870E073C6FA625 /* Pods-KarhooUISDKTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KarhooUISDKTests.release.xcconfig"; path = "Target Support Files/Pods-KarhooUISDKTests/Pods-KarhooUISDKTests.release.xcconfig"; sourceTree = ""; }; D4FF9AA60A45140BA9A03393 /* Pods-KarhooUISDK.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KarhooUISDK.release.xcconfig"; path = "Target Support Files/Pods-KarhooUISDK/Pods-KarhooUISDK.release.xcconfig"; sourceTree = ""; }; D81D41184B1720B617023B4A /* Pods-KarhooUISDK-KarhooUISDKTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KarhooUISDK-KarhooUISDKTests.release.xcconfig"; path = "Target Support Files/Pods-KarhooUISDK-KarhooUISDKTests/Pods-KarhooUISDK-KarhooUISDKTests.release.xcconfig"; sourceTree = ""; }; D8263F4D262096C30042F259 /* TimeFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeFormatter.swift; sourceTree = ""; }; @@ -1290,7 +1292,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4F861952DAF7F4C86C020496 /* Pods_KarhooUISDK_KarhooUISDKTests.framework in Frameworks */, + E7924B697A641DB730B96B58 /* Pods_KarhooUISDKTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2902,6 +2904,8 @@ D4FF9AA60A45140BA9A03393 /* Pods-KarhooUISDK.release.xcconfig */, BA1B3102F7FC60181D4E1B93 /* Pods-KarhooUISDK-KarhooUISDKTests.debug.xcconfig */, D81D41184B1720B617023B4A /* Pods-KarhooUISDK-KarhooUISDKTests.release.xcconfig */, + 5BDB2D31A5FE6ABE54D2CAD5 /* Pods-KarhooUISDKTests.debug.xcconfig */, + CF3BD98C77870E073C6FA625 /* Pods-KarhooUISDKTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -2934,7 +2938,7 @@ 09EBC66922D612C600F1177E /* KarhooSDK.framework */, 1570AD2CDCCFAB4785733B84 /* Pods_Client.framework */, C652E366D739CC18F36FA302 /* Pods_KarhooUISDK.framework */, - 4C7F5D9A2B1DE827AD262C2F /* Pods_KarhooUISDK_KarhooUISDKTests.framework */, + 2982506C7B50F0D6BE25CAA8 /* Pods_KarhooUISDKTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -3792,7 +3796,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-KarhooUISDK-KarhooUISDKTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-KarhooUISDKTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -3845,15 +3849,15 @@ files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KarhooUISDK-KarhooUISDKTests/Pods-KarhooUISDK-KarhooUISDKTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-KarhooUISDKTests/Pods-KarhooUISDKTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-KarhooUISDK-KarhooUISDKTests/Pods-KarhooUISDK-KarhooUISDKTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-KarhooUISDKTests/Pods-KarhooUISDKTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KarhooUISDK-KarhooUISDKTests/Pods-KarhooUISDK-KarhooUISDKTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KarhooUISDKTests/Pods-KarhooUISDKTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; C64139C917B4E25FD0526BD4 /* [CP] Embed Pods Frameworks */ = { @@ -4720,7 +4724,7 @@ CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 15; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = U7U4Q7YGDH; DYLIB_COMPATIBILITY_VERSION = 1; @@ -4738,7 +4742,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.9.0; + MARKETING_VERSION = 1.9.1; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.karhoo.KarhooUISDK; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -4761,7 +4765,7 @@ CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 15; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = U7U4Q7YGDH; DYLIB_COMPATIBILITY_VERSION = 1; @@ -4779,7 +4783,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.9.0; + MARKETING_VERSION = 1.9.1; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.karhoo.KarhooUISDK; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -4793,7 +4797,7 @@ }; FC8F472C21539E24007841FB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BA1B3102F7FC60181D4E1B93 /* Pods-KarhooUISDK-KarhooUISDKTests.debug.xcconfig */; + baseConfigurationReference = 5BDB2D31A5FE6ABE54D2CAD5 /* Pods-KarhooUISDKTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; @@ -4801,7 +4805,6 @@ DEVELOPMENT_TEAM = U7U4Q7YGDH; EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = "$(inherited)"; ENABLE_TESTING_SEARCH_PATHS = YES; - EXCLUDED_ARCHS = "x86_64-apple-ios-simulator"; INFOPLIST_FILE = KarhooUISDKTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -4818,14 +4821,13 @@ }; FC8F472D21539E24007841FB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D81D41184B1720B617023B4A /* Pods-KarhooUISDK-KarhooUISDKTests.release.xcconfig */; + baseConfigurationReference = CF3BD98C77870E073C6FA625 /* Pods-KarhooUISDKTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = U7U4Q7YGDH; ENABLE_TESTING_SEARCH_PATHS = YES; - EXCLUDED_ARCHS = "x86_64-apple-ios-simulator"; INFOPLIST_FILE = KarhooUISDKTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/KarhooUISDK/CommonUI/Views/IconPlusTextHorizontalView.swift b/KarhooUISDK/CommonUI/Views/IconPlusTextHorizontalView.swift index ff4c61bd1..aaf91f099 100644 --- a/KarhooUISDK/CommonUI/Views/IconPlusTextHorizontalView.swift +++ b/KarhooUISDK/CommonUI/Views/IconPlusTextHorizontalView.swift @@ -4,6 +4,7 @@ // import Foundation +import UIKit public struct KHIconPlusTextHorizontalViewID { public static let stack = "icon_plus_label_stack" diff --git a/KarhooUISDK/Routing/KarhooUISDKSceneCoordinator.swift b/KarhooUISDK/Routing/KarhooUISDKSceneCoordinator.swift index ae2455e0a..f07ccf17c 100644 --- a/KarhooUISDK/Routing/KarhooUISDKSceneCoordinator.swift +++ b/KarhooUISDK/Routing/KarhooUISDKSceneCoordinator.swift @@ -7,6 +7,7 @@ // import Foundation +import UIKit public protocol KarhooUISDKSceneCoordinator: AnyObject { diff --git a/KarhooUISDK/Screens/BookingScreen/BookingRouter.swift b/KarhooUISDK/Screens/BookingScreen/BookingRouter.swift index 874df3622..56a7345cc 100644 --- a/KarhooUISDK/Screens/BookingScreen/BookingRouter.swift +++ b/KarhooUISDK/Screens/BookingScreen/BookingRouter.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit class KarhooBookingRouter: BookingRouter { diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/EcoFriendlyFilter.swift b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/EcoFriendlyFilter.swift index d69e6cc0b..5b9452bc4 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/EcoFriendlyFilter.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/EcoFriendlyFilter.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit extension QuoteListFilters { enum EcoFriendly: String, QuoteListFilter, CaseIterable { diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/FleetCapabilitiesFilter.swift b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/FleetCapabilitiesFilter.swift index 204e25bd4..1e8428b5c 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/FleetCapabilitiesFilter.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/FleetCapabilitiesFilter.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit extension QuoteListFilters { enum FleetCapabilities: String, QuoteListFilter, CaseIterable { diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/LuggageCapacityFilter.swift b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/LuggageCapacityFilter.swift index d6c36039e..d9c585470 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/LuggageCapacityFilter.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/LuggageCapacityFilter.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit extension QuoteListFilters { struct LuggageCapacityModel: QuoteListNumericFilter { diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/PassengerCapacityFilter.swift b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/PassengerCapacityFilter.swift index e8438d9fb..4e8a85eb7 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/PassengerCapacityFilter.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/PassengerCapacityFilter.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit extension QuoteListFilters { struct PassengerCapacityModel: QuoteListNumericFilter { diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/QuoteListFilter.swift b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/QuoteListFilter.swift index c973bdccc..9f1c3d12e 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/QuoteListFilter.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/QuoteListFilter.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit protocol QuoteListFilter { var icon: UIImage? { get } diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/VehicleClassFilter.swift b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/VehicleClassFilter.swift index b7350e4ff..4b8dc288e 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/VehicleClassFilter.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/VehicleClassFilter.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit extension QuoteListFilters { enum VehicleClass: String, UserSelectable, CaseIterable, QuoteListFilter { diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/VehicleExtrasFilter.swift b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/VehicleExtrasFilter.swift index 929ecc6ee..a4037af35 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/VehicleExtrasFilter.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListFilters/Filters/VehicleExtrasFilter.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit extension QuoteListFilters { enum VehicleExtras: String, UserSelectable, CaseIterable, QuoteListFilter { diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListPresenter.swift b/KarhooUISDK/Screens/QuoteList/QuoteListPresenter.swift index 2d604419e..6b10122b0 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListPresenter.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListPresenter.swift @@ -7,6 +7,8 @@ // import KarhooSDK +import Foundation +import UIKit final class KarhooQuoteListPresenter: QuoteListPresenter { diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListSort/QuoteListSortCorrdinator.swift b/KarhooUISDK/Screens/QuoteList/QuoteListSort/QuoteListSortCorrdinator.swift index 1086b80d4..1276b06e7 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListSort/QuoteListSortCorrdinator.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListSort/QuoteListSortCorrdinator.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit class KarhooQuoteListSortCoordinator: QuoteListSortCoordinator { diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListTable/QuoteListTable+MVPC.swift b/KarhooUISDK/Screens/QuoteList/QuoteListTable/QuoteListTable+MVPC.swift index b772d4bf8..25529aa8f 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListTable/QuoteListTable+MVPC.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListTable/QuoteListTable+MVPC.swift @@ -8,6 +8,7 @@ import KarhooSDK import Foundation +import UIKit protocol QuoteListTableCoordinator: KarhooUISDKSceneCoordinator { var viewController: QuoteListTableViewController { get } diff --git a/KarhooUISDK/Screens/QuoteList/QuoteListTable/QuoteListTablePresenter.swift b/KarhooUISDK/Screens/QuoteList/QuoteListTable/QuoteListTablePresenter.swift index 24fd11c1e..f4ada52c1 100644 --- a/KarhooUISDK/Screens/QuoteList/QuoteListTable/QuoteListTablePresenter.swift +++ b/KarhooUISDK/Screens/QuoteList/QuoteListTable/QuoteListTablePresenter.swift @@ -8,6 +8,7 @@ import Foundation import KarhooSDK +import UIKit class KarhooQuoteListTablePresenter: QuoteListTablePresenter { diff --git a/KarhooUISDKTests/TestCases/Common/BraintreePaymentNonceProviderSpec.swift b/KarhooUISDKTests/TestCases/Common/BraintreePaymentNonceProviderSpec.swift index c6e013871..6d221f4be 100644 --- a/KarhooUISDKTests/TestCases/Common/BraintreePaymentNonceProviderSpec.swift +++ b/KarhooUISDKTests/TestCases/Common/BraintreePaymentNonceProviderSpec.swift @@ -9,6 +9,9 @@ import Foundation import XCTest +#if SWIFT_PACKAGE +@testable import KarhooUISDKBraintree +#endif @testable import KarhooSDK @testable import KarhooUISDK diff --git a/KarhooUISDKTests/TestCases/Common/BraintreeThreeDSecureProviderSpec.swift b/KarhooUISDKTests/TestCases/Common/BraintreeThreeDSecureProviderSpec.swift index 7ee5b53a6..12bf02d28 100644 --- a/KarhooUISDKTests/TestCases/Common/BraintreeThreeDSecureProviderSpec.swift +++ b/KarhooUISDKTests/TestCases/Common/BraintreeThreeDSecureProviderSpec.swift @@ -10,6 +10,9 @@ import Foundation import XCTest import KarhooSDK +#if SWIFT_PACKAGE +@testable import KarhooUISDKBraintree +#endif @testable import KarhooUISDK final class BraintreeThreeDSecureProviderSpec: KarhooTestCase { diff --git a/KarhooUISDKTests/TestCases/Routing/AdyenCardRegistrationFlowSpec.swift b/KarhooUISDKTests/TestCases/Routing/AdyenCardRegistrationFlowSpec.swift index 223318cf0..f3ed76504 100644 --- a/KarhooUISDKTests/TestCases/Routing/AdyenCardRegistrationFlowSpec.swift +++ b/KarhooUISDKTests/TestCases/Routing/AdyenCardRegistrationFlowSpec.swift @@ -9,6 +9,9 @@ import Foundation import XCTest +#if SWIFT_PACKAGE +@testable import KarhooUISDKAdyen +#endif @testable import KarhooSDK @testable import KarhooUISDK diff --git a/KarhooUISDKTests/TestCases/Routing/KarhooCardRegistrationFlowSpec.swift b/KarhooUISDKTests/TestCases/Routing/KarhooCardRegistrationFlowSpec.swift index 058df57ed..24bea9103 100644 --- a/KarhooUISDKTests/TestCases/Routing/KarhooCardRegistrationFlowSpec.swift +++ b/KarhooUISDKTests/TestCases/Routing/KarhooCardRegistrationFlowSpec.swift @@ -9,6 +9,9 @@ import Foundation import XCTest +#if SWIFT_PACKAGE +@testable import KarhooUISDKBraintree +#endif @testable import KarhooSDK @testable import KarhooUISDK diff --git a/KarhooUISDKTests/TestCases/Screens/BookingScreen/QuoteCategoryBar/KarhooQuoteCategoryBarPresenterSpec.swift b/KarhooUISDKTests/TestCases/Screens/BookingScreen/QuoteCategoryBar/KarhooQuoteCategoryBarPresenterSpec.swift deleted file mode 100644 index 2c3ed884e..000000000 --- a/KarhooUISDKTests/TestCases/Screens/BookingScreen/QuoteCategoryBar/KarhooQuoteCategoryBarPresenterSpec.swift +++ /dev/null @@ -1,206 +0,0 @@ -// -// KarhooQuoteCategoryBarPresenterSpec.swift -// Karhoo -// -// -// Copyright © 2020 Karhoo All rights reserved. -// - -import XCTest -import KarhooSDK - -@testable import KarhooUISDK - -class KarhooQuoteCategoryBarPresenterSpec: KarhooTestCase { - - private var mockView: MockQuoteCategoryBarView! - private var mockAppAnalytics: MockAnalytics! - private var mockJourneyDetailsManager: MockJourneyDetailsManager! - private var testObject: KarhooQuoteCategoryBarPresenter! - - override func setUp() { - super.setUp() - - mockView = MockQuoteCategoryBarView() - mockAppAnalytics = MockAnalytics() - mockJourneyDetailsManager = MockJourneyDetailsManager() - testObject = KarhooQuoteCategoryBarPresenter(analytics: mockAppAnalytics, - journeyDetailsManager: mockJourneyDetailsManager, - view: mockView) - - } - - /** - * When: Booking details changed - * Then: Categories shoud reset - */ - func testChangingBookingDetailsClearsCategories() { - let changedJourneyDetails = TestUtil.getRandomJourneyDetails() - testObject.journeyDetailsChanged(details: changedJourneyDetails) - - XCTAssertTrue(mockView.categoriesSet!.isEmpty) - } - - /** - * Given: Availability has not been loaded - * When: Delegates had been set - * Then: Nothing should happen (no crash / values of testview should be nil) - */ - func testCategoriesNotUpdated() { - XCTAssertNil(mockView.categoriesSet) - XCTAssertNil(mockView.indexSelected) - } - - func createCategories(withNames names: [String]) -> [QuoteCategory] { - return names.map { QuoteCategory(name: $0, quotes: []) } - } - - /** - * Given: Availability has been loaded - * When: Delegates had been set - * Then: It should immediately be informed about the available cars - * And: The last category [ALL] should be selected - */ - func testCategoriesChanged() { - let categories = createCategories(withNames: ["ABC", "def", "ÄÖ"]) - let expectedCategories = createCategories(withNames: ["ABC", "def", "ÄÖ", UITexts.Availability.allCategory]) - testObject.categoriesChanged(categories: categories, quoteListId: nil) - - XCTAssertEqual(expectedCategories, mockView.categoriesSet) - XCTAssertEqual(expectedCategories.count - 1, mockView.indexSelected) - } - - /** - * Given: The selected category does not exist amongst the received items - * When: New categories have been received - * Then: The view should be told about them - * And: The final category should be selected - */ - func testNewAvailability() { - - let categories = createCategories(withNames: ["ABC", "def", "ÄÖ"]) - let expectedCategories = createCategories(withNames: ["ABC", "def", "ÄÖ", UITexts.Availability.allCategory]) - let selectedIndex = expectedCategories.count - 1 - testObject.categoriesChanged(categories: categories, quoteListId: nil) - - XCTAssertEqual(expectedCategories, mockView.categoriesSet!) - XCTAssertEqual(selectedIndex, mockView.indexSelected) - - let nextCategories = createCategories(withNames: ["ABC", "def"]) - let nextExpectedCategories = createCategories(withNames: ["ABC", "def", UITexts.Availability.allCategory]) - testObject.categoriesChanged(categories: nextCategories, quoteListId: nil) - - XCTAssertEqual(nextExpectedCategories, mockView.categoriesSet!) - XCTAssertEqual(nextExpectedCategories.count - 1, mockView.indexSelected) - } - - /** - * Given: The selected category exists amongst the received items - * When: New categories have been received - * Then: The view should be told about them - * And: The selected category index should be reset to the All category (always last) - */ - func testUpdatedCategoryPositionForDifferentCategoryCount() { - - let selectedIndex = 1 - let categories = createCategories(withNames: ["ABC", "def", "ÄÖ"]) - testObject.categoriesChanged(categories: categories, quoteListId: nil) - testObject.selected(index: selectedIndex, animated: false) - - let categories2 = createCategories(withNames: ["abc", "ÄÖ", "hej", "def"]) - let expectedCategories2 = createCategories(withNames: ["abc", "ÄÖ", "hej", "def", - UITexts.Availability.allCategory]) - testObject.categoriesChanged(categories: categories2, quoteListId: nil) - - XCTAssertEqual(expectedCategories2, mockView.categoriesSet!) - XCTAssertEqual(mockView.indexSelected, expectedCategories2.count - 1) - } - - /** - * Given: The selected category exists amongst the received items - * When: New categories have been received - * Then: The view should be told about them - * And: The selected category index should point to the same position - */ - func testUpdatedCategoryPositionForSameCategoryCount() { - - let selectedIndex = 1 - let categories = createCategories(withNames: ["ABC", "def", "ÄÖ"]) - testObject.categoriesChanged(categories: categories, quoteListId: nil) - testObject.selected(index: selectedIndex, animated: false) - - let categories2 = createCategories(withNames: ["abc", "ÄÖ", "hej"]) - let expectedCategories2 = createCategories(withNames: ["abc", "ÄÖ", "hej", - UITexts.Availability.allCategory]) - testObject.categoriesChanged(categories: categories2, quoteListId: nil) - - XCTAssertEqual(expectedCategories2, mockView.categoriesSet!) - XCTAssertEqual(selectedIndex, mockView.indexSelected) - } - - /** - * When: A different category has been selected - * Then: The available items should be filtered based on that category - * And: The view should display that category as selected - * And: VehicleTypeSelected analytics event should be fired - */ - func testCategorySelection() { - let categories = createCategories(withNames: ["ABC", "def", "ÄÖ"]) - testObject.categoriesChanged(categories: categories, quoteListId: nil) - - let index = 1 - testObject.selected(index: index, animated: false) - - XCTAssertEqual(index, mockView.indexSelected) - } - - /** - * When: A different category has been selected - * Then: The view selected index should be updated - */ - func testSameCategorySelection() { - let categories = createCategories(withNames: ["ABC", "def", "ÄÖ"]) - testObject.categoriesChanged(categories: categories, quoteListId: nil) - - let index = 1 - testObject.selected(index: index, animated: false) - - XCTAssertEqual(1, mockView.indexSelected) - } - - /** - * When: An invalid category has been selected - * Then: Nothing should happen (no crash) - */ - func testInvalidCategorySelection() { - let categories: [QuoteCategory] = [] - testObject.categoriesChanged(categories: categories, quoteListId: nil) - - let index = 0 - testObject.selected(index: index, animated: false) - - XCTAssertNil(mockView.indexSelected) - } - - /** - * Given: Categories ['MPV', 'ALL'] received - * And: 'MPV' selected - * When: Categories ['TAXI', 'ALL'] received (e.g. switching to a different city) - * Then: 'ALL' should be selected - * And: View should have index 1 [last] selected - */ - func testSwitchingFromMissingCategory() { - let categoriesOne = createCategories(withNames: ["MPV"]) - - let selectedIndex = 0 - testObject.categoriesChanged(categories: categoriesOne, quoteListId: nil) - testObject.selected(index: selectedIndex, animated: false) - - XCTAssertEqual(selectedIndex, mockView.indexSelected) - - let categoriesTwo = createCategories(withNames: ["TAXI"]) - testObject.categoriesChanged(categories: categoriesTwo, quoteListId: nil) - - XCTAssertEqual(selectedIndex, mockView.indexSelected) - } -} diff --git a/Package.swift b/Package.swift index 8513cbd55..66c4f4f4b 100644 --- a/Package.swift +++ b/Package.swift @@ -24,9 +24,8 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(name: "KarhooSDK", url: "https://github.com/karhoo/karhoo-ios-sdk", .exact(Version(1, 6, 2))), + .package(name: "KarhooSDK", url: "https://github.com/karhoo/karhoo-ios-sdk", .exact(Version(1, 6, 3))), .package(name: "Adyen", url: "https://github.com/Adyen/adyen-ios", .exact(Version(4, 7, 1))), - .package(name: "FloatingPanel", url: "https://github.com/scenee/FloatingPanel", .exact(Version(2, 0, 1))), .package(name: "BraintreeDropIn", url: "https://github.com/braintree/braintree-ios-drop-in", .exact(Version(9, 3, 0))), .package(name: "PhoneNumberKit", url: "https://github.com/marmelroy/PhoneNumberKit", .exact(Version(3, 3, 1))), .package(name: "Braintree", url: "https://github.com/braintree/braintree_ios", .exact(Version(5, 6, 3))) @@ -35,7 +34,6 @@ let package = Package( .target( name: "KarhooUISDK", dependencies: [.product(name: "KarhooSDK", package: "KarhooSDK"), - .product(name: "FloatingPanel", package: "FloatingPanel"), .product(name: "PhoneNumberKit", package: "PhoneNumberKit")], path: "KarhooUISDK", exclude: ["Extensions/Bundle+extensions/Bundle+current.swift", "Info.plist"]), diff --git a/Podfile b/Podfile index 8e6eba51e..e982f4514 100644 --- a/Podfile +++ b/Podfile @@ -9,7 +9,7 @@ use_frameworks! post_install do |installer_representation| installer_representation.pods_project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings[‘ONLY_ACTIVE_ARCH’] = ‘NO’ + config.build_settings[‘ONLY_ACTIVE_ARCH’] = ‘YES’ config.build_settings[“EXCLUDED_ARCHS[sdk=iphonesimulator*]“] = “arm64” config.build_settings[‘BUILD_LIBRARY_FOR_DISTRIBUTION’] = ‘YES’ end @@ -32,15 +32,16 @@ end target 'KarhooUISDK' do # pod 'KarhooSDK', :git => 'https://github.com/karhoo/karhoo-ios-sdk', :branch => 'develop' pod 'KarhooSDK', '1.6.3' - pod 'FloatingPanel', '2.0.1' pod 'SwiftLint', '~> 0.47' pod 'PhoneNumberKit', '3.3.1' pod 'SwiftFormat/CLI', '~> 0.49' pod 'BraintreeDropIn', '~> 8.1' pod 'Braintree/PaymentFlow', '~> 4.37' pod 'Adyen', '4.7.1' +end - target 'KarhooUISDKTests' do - inherit! :complete - end +target 'KarhooUISDKTests' do + inherit! :complete + pod 'KarhooUISDK/Adyen', :path => './' + pod 'KarhooUISDK/Braintree', :path => './' end diff --git a/Podfile.lock b/Podfile.lock index 74790fe70..e6c3dd0c4 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -57,21 +57,19 @@ PODS: - Braintree/UnionPay (~> 4.32) - BraintreeDropIn/UIKit - BraintreeDropIn/UIKit (8.2.0) - - FloatingPanel (2.0.1) - KarhooSDK (1.6.3): - KeychainSwift (= 12.0.0) - ReachabilitySwift (= 5.0.0) - - KarhooUISDK (1.9.0): - - KarhooUISDK/Core (= 1.9.0) - - KarhooUISDK/Adyen (1.9.0): + - KarhooUISDK (1.9.1): + - KarhooUISDK/Core (= 1.9.1) + - KarhooUISDK/Adyen (1.9.1): - Adyen (= 4.7.1) - KarhooUISDK/Core - - KarhooUISDK/Braintree (1.9.0): + - KarhooUISDK/Braintree (1.9.1): - Braintree/PaymentFlow (~> 4.37) - BraintreeDropIn (~> 8.1) - KarhooUISDK/Core - - KarhooUISDK/Core (1.9.0): - - FloatingPanel (= 2.0.1) + - KarhooUISDK/Core (1.9.1): - KarhooSDK - PhoneNumberKit (= 3.3.1) - KeychainSwift (12.0.0) @@ -89,7 +87,6 @@ DEPENDENCIES: - Adyen (= 4.7.1) - Braintree/PaymentFlow (~> 4.37) - BraintreeDropIn (~> 8.1) - - FloatingPanel (= 2.0.1) - KarhooSDK (= 1.6.3) - KarhooUISDK (from `./`) - KarhooUISDK/Adyen (from `./`) @@ -105,7 +102,6 @@ SPEC REPOS: - AdyenNetworking - Braintree - BraintreeDropIn - - FloatingPanel - KarhooSDK - KeychainSwift - PhoneNumberKit @@ -123,15 +119,14 @@ SPEC CHECKSUMS: AdyenNetworking: 14567bd00c00ba2e2580a904708c7ba5f010b1f9 Braintree: 78a33deb6f6ec617c2c4891fbe352854358b3a8d BraintreeDropIn: b57b653d130981aad7ad9bc97a69d3d7ef86f7a1 - FloatingPanel: 579a5ac0154f923a9d7302c4f13dbc0268511c92 KarhooSDK: ecdd7cdcaa76f2a3d52e3b2331414fde6c7d770e - KarhooUISDK: a2f3406f3b8a2f0a93cfc6412f864f121e0397a2 + KarhooUISDK: 8829b6f120b36ee44054b73286eebb90e66997b0 KeychainSwift: d5e776578587ee5958ce36601df22f168f65138a PhoneNumberKit: ff153d5e299f6da566cb73c6aa71e354933b2932 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 SwiftFormat: 09cc5eb67ae49356c4ad9a2be6a0d5a4212b61bb SwiftLint: 284cea64b6187c5d6bd83e9a548a64104d546447 -PODFILE CHECKSUM: 557bfb485c7bb6184ae74204985fca96582d34db +PODFILE CHECKSUM: 61dee75303e83e71333d8c66dd1d6f795d8bf2e9 COCOAPODS: 1.11.3 diff --git a/README.md b/README.md index 3cdb38be4..4cd26305f 100644 --- a/README.md +++ b/README.md @@ -25,15 +25,15 @@ You can use [CocoaPods](http://cocoapods.org/) to install `KarhooUISDK` by addin use_frameworks! pod 'KarhooSDK', '1.6.3' -pod 'KarhooUISDK', :git => 'git@github.com:karhoo/karhoo-ios-ui-sdk.git', :tag => '1.9.0' +pod 'KarhooUISDK', :git => 'git@github.com:karhoo/karhoo-ios-ui-sdk.git', :tag => '1.9.1' ``` Depending on payment provider you want to use in your integration add: ```ruby -pod 'KarhooUISDK/Adyen', :git => 'git@github.com:karhoo/karhoo-ios-ui-sdk.git', :tag => '1.9.0' +pod 'KarhooUISDK/Adyen', :git => 'git@github.com:karhoo/karhoo-ios-ui-sdk.git', :tag => '1.9.1' ``` or ```ruby -pod 'KarhooUISDK/Braintree', :git => 'git@github.com:karhoo/karhoo-ios-ui-sdk.git', :tag => '1.9.0' +pod 'KarhooUISDK/Braintree', :git => 'git@github.com:karhoo/karhoo-ios-ui-sdk.git', :tag => '1.9.1' ``` then import `KarhooUISDK` wherever you want to access Karhoo services