Skip to content

Commit

Permalink
Ability to set the visibility of the scanner option
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaRabie committed May 30, 2023
1 parent d395bb3 commit 5285986
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '11.0'
platform :ios, '13.0'
use_frameworks!

source 'https://github.com/CocoaPods/Specs.git'
Expand All @@ -7,7 +7,7 @@ target 'goSellSDKExample' do

pod 'Crashlytics'
pod 'Fabric'

pod 'TapApplePayKit-iOS'
pod 'goSellSDK', :path => '../'
# pod 'goSellSDK/ErrorReporting', :path => '../'

Expand Down
32 changes: 27 additions & 5 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
PODS:
- CardIODynamic (5.4.1)
- CommonDataModelsKit-iOS (1.0.123):
- SwiftyRSA
- TapAdditionsKitV2
- TapCardVlidatorKit-iOS
- TapKeychain
- Crashlytics (3.14.0):
- Fabric (~> 1.10.2)
- EditableTextInsetsTextFieldV2 (0.0.2):
- TapAdditionsKitV2
- Fabric (1.10.2)
- goSellSDK (2.3.20):
- goSellSDK/Core (= 2.3.20)
- goSellSDK/Core (2.3.20):
- goSellSDK (2.3.21):
- goSellSDK/Core (= 2.3.21)
- goSellSDK/Core (2.3.21):
- CardIODynamic
- EditableTextInsetsTextFieldV2
- SwiftyRSA
Expand All @@ -29,6 +34,10 @@ PODS:
- SwiftyRSA/ObjC (1.7.0)
- TapAdditionsKitV2 (0.0.9):
- TapSwiftFixesV2
- TapApplePayKit-iOS (1.0.14):
- CommonDataModelsKit-iOS
- TapApplicationV2
- TapNetworkKit-iOS
- TapApplicationV2 (0.0.2):
- TapAdditionsKitV2
- TapBundleLocalization (1.0.3)
Expand All @@ -40,6 +49,12 @@ PODS:
- TapGLKitV2 (0.0.2):
- TapAdditionsKitV2
- TapKeychain (1.0.5)
- TapNetworkKit-iOS (1.0.14):
- CommonDataModelsKit-iOS
- SwiftyRSA
- TapAdditionsKitV2
- TapApplicationV2
- TapCardVlidatorKit-iOS
- TapNetworkManagerV2 (0.0.5):
- TapAdditionsKitV2
- TapNibViewV2 (0.0.2):
Expand All @@ -65,22 +80,26 @@ DEPENDENCIES:
- Crashlytics
- Fabric
- goSellSDK (from `../`)
- TapApplePayKit-iOS

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- CardIODynamic
- CommonDataModelsKit-iOS
- Crashlytics
- EditableTextInsetsTextFieldV2
- Fabric
- SwiftyRSA
- TapAdditionsKitV2
- TapApplePayKit-iOS
- TapApplicationV2
- TapBundleLocalization
- TapCardVlidatorKit-iOS
- TapEditableViewV2
- TapFontsKitV2
- TapGLKitV2
- TapKeychain
- TapNetworkKit-iOS
- TapNetworkManagerV2
- TapNibViewV2
- TapResponderChainInputViewV2
Expand All @@ -94,26 +113,29 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
CardIODynamic: 4a0d2d0e7b82993ceca67491564934c3475fbe79
CommonDataModelsKit-iOS: db862bc1c196fd4e0e66ec5168571792939a4e7a
Crashlytics: 9220f5bc89e7a618df411b4f639389dbfb0e03d2
EditableTextInsetsTextFieldV2: 09a945c086dbcef688fe4fbb8302b408c146c391
Fabric: ea977e3cd9c20425516d3dafd3bf8c941c51223f
goSellSDK: b56e1b6348df87b447045e44db95ccd6a1ab1231
goSellSDK: ac79ee417cd709485adadaa4016d37bb4189e517
SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6
TapAdditionsKitV2: 9846381c32b150303cbeff355550d3500a98f77d
TapApplePayKit-iOS: e45d9c999b427f327a70dc838919336d61a22ff7
TapApplicationV2: aee3d046c4272778431e1535de6cab34e1269f8c
TapBundleLocalization: c7d7c14850223b0ef447aca1269d7308f78d54f9
TapCardVlidatorKit-iOS: 00ac65c44019f955234640e5d4ca583f639edca2
TapEditableViewV2: 00370b2b6c967c382fa944be8c04156d584d630b
TapFontsKitV2: b05e5ed03fc182c227f0660a0b318f44934d353c
TapGLKitV2: d3ef8bc5d1655a1d46e1696cfdcf19ae6e6d4d35
TapKeychain: 143aa70bb2d1b094e0298e944660264034c79849
TapNetworkKit-iOS: 92c8c7feae384dc2595f8f270853ee3cf8ea3380
TapNetworkManagerV2: 857339ae980c9fb495ec9a4c609beabaeeeb5999
TapNibViewV2: 814b18346837d9dab611a211a702b9b0b8369d07
TapResponderChainInputViewV2: 2dcd4bda246b0bd8764ee7fe8dbbd092815d063f
TapSearchViewV2: a167173db767a2be86d66c319cbb6b8da1541531
TapSwiftFixesV2: a8623a7273c6790b9754ec7e272e96fce7d3a800
TapVisualEffectViewV2: b612ffee4d05004c449d433fe45aba9563c8a508

PODFILE CHECKSUM: dc0834a994af3dbfe06d4ef3464a15f4e92d9471
PODFILE CHECKSUM: df1cbf9e864411340fbaef977817db3974186d13

COCOAPODS: 1.11.2
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ extension ExampleViewController: SettingsTableViewControlerDelegate {
// MARK: - SessionDataSource
extension ExampleViewController: SessionDataSource {


internal var setCardScannerIconVisible: Bool {
return true
}

internal var currency: Currency? {

return self.paymentSettings.dataSource.currency
Expand Down
2 changes: 1 addition & 1 deletion goSellSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Pod::Spec.new do |goSellSDK|
goSellSDK.name = 'goSellSDK'
goSellSDK.summary = 'goSell SDK for iOS'
goSellSDK.requires_arc = true
goSellSDK.version = '2.3.21'
goSellSDK.version = '2.3.22'
goSellSDK.license = { :type => 'MIT', :file => 'LICENSE' }
goSellSDK.author = { 'Tap Payments' => '[email protected]' }
goSellSDK.homepage = 'https://github.com/Tap-Payments/goSellSDK-iOS'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ extension CardInputTableViewCellModel: CardInputTableViewCellLoading {

internal var isScanButtonVisible: Bool {
#if canImport(CardIO)
return CardIOUtilities.canReadCardWithCamera() && TapApplicationPlistInfo.shared.hasUsageDescription(for: .camera)
return CardIOUtilities.canReadCardWithCamera() && TapApplicationPlistInfo.shared.hasUsageDescription(for: .camera) && (Process.shared.externalSession?.dataSource?.setCardScannerIconVisible ?? false)
#else
return false
#endif
Expand Down
3 changes: 3 additions & 0 deletions goSellSDK/Core/UI/Public/Protocols/SessionDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ import class PassKit.PKPaymentToken

/// Defines if 3D secure check is required.
@objc optional var require3DSecure: Bool { get }

/// Defines if scanner should be visible or not
@objc optional var setCardScannerIconVisible:Bool { get }

/// Receipt dispatch settings.
@objc optional var receiptSettings: Receipt? { get }
Expand Down

0 comments on commit 5285986

Please sign in to comment.