Skip to content

Commit

Permalink
release version 2.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mulp committed Jul 9, 2021
1 parent 9918dc3 commit 3f9908e
Show file tree
Hide file tree
Showing 64 changed files with 1,815 additions and 362 deletions.
6 changes: 3 additions & 3 deletions AptoUISDK.podspec
Expand Up @@ -8,15 +8,15 @@

Pod::Spec.new do |s|
s.name = "AptoUISDK"
s.version = "2.12.0"
s.version = "2.13.0"
s.summary = "The Apto UI platform iOS SDK."
s.description = <<-DESC
Apto iOS UI SDK provides a UI flow that allows to easily integrate the platform in your app.
DESC
s.homepage = "https://github.com/AptoPayments/apto-ui-sdk-ios.git"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.authors = { "Ivan Oliver" => "ivan@aptopayments.com", "Takeichi Kanzaki" => "takeichi@aptopayments.com" }
s.source = { :git => "https://github.com/AptoPayments/apto-ui-sdk-ios.git", :tag => "2.12.0" }
s.source = { :git => "https://github.com/AptoPayments/apto-ui-sdk-ios.git", :tag => "2.13.0" }

s.platform = :ios
s.ios.deployment_target = '10.0'
Expand All @@ -32,7 +32,7 @@ Pod::Spec.new do |s|
s.resources = ["Pod/Assets/*.png", "Pod/Assets/*.css", "Pod/Localization/*.lproj", "Pod/Assets/*.xcassets", "Pod/Fonts/*.ttf", "Pod/CHANGELOG_ui.md"]

s.frameworks = 'UIKit', 'CoreLocation', 'Accelerate', 'AudioToolbox', 'AVFoundation', 'CoreGraphics', 'CoreMedia', 'CoreVideo', 'Foundation', 'MobileCoreServices', 'OpenGLES', 'QuartzCore', 'Security', 'LocalAuthentication', 'CallKit'
s.dependency 'AptoSDK', '3.4.0'
s.dependency 'AptoSDK', '3.5.0'
s.dependency 'AptoPCI', '2.1.0'
s.dependency 'SnapKit', '~> 5.0'
s.dependency 'Bond', '~> 7.6'
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG_ui.md
@@ -0,0 +1,18 @@
## CHANGELOG AptoUISDK

# 2021-07-09 Version 2.13.0
- feature: add alpha version of In App Card Provisioning. Add a card to Apple Wallet.
- improvement: added Load Funds Disclosure screen
- fix: improved load funds screen for smaller devices
- fix: error copies in add card screen

# 2021-05-26 Version 2.12.0
- improvement: validated SSN field format
- improvement: updated AlamoFire dependency to the 5.4.3 version.
- fix: resolved issue making the OTP alert dialog not showing up.
- improvement: removed wrong error messages on user logout.
- fix: added the card logo on the main card screen

# 2021-04-26 Version 2.11.0
- feature: added new `Exchange rates` disclaimer agreement on Card Settings, if available.
- fix: removes `Monthly Statements` from Account settings.
10 changes: 5 additions & 5 deletions Example/Podfile.lock
Expand Up @@ -7,7 +7,7 @@ PODS:
- AptoObjCSDK (1.1.0):
- AptoSDK
- AptoPCI (2.1.0)
- AptoSDK (3.4.0):
- AptoSDK (3.5.0):
- Alamofire (~> 5.4.3)
- AlamofireNetworkActivityIndicator (~> 3.1)
- Bond (~> 7.6)
Expand All @@ -17,9 +17,9 @@ PODS:
- PhoneNumberKit (~> 3.2)
- SwiftyJSON (~> 5.0)
- TrustKit (~> 1.6)
- AptoUISDK (2.11.1):
- AptoUISDK (2.12.0):
- AptoPCI (= 2.1.0)
- AptoSDK (= 3.4.0)
- AptoSDK (= 3.5.0)
- Bond (~> 7.6)
- Down (~> 0.8.0)
- GoogleKit (~> 0.3)
Expand Down Expand Up @@ -115,8 +115,8 @@ SPEC CHECKSUMS:
AlamofireNetworkActivityLogger: 162ab8aee00e6267a4304d7cc134e13ccfe3bcc5
AptoObjCSDK: 818ed46d0b6328d9ec76f32ab39e51d8ed8dffb1
AptoPCI: 8a85a014534b5d9036170e3698309de4fa51bc88
AptoSDK: 95b488240ddf27c607a0b4189c22c4681aeaa308
AptoUISDK: 6a140476051a2212677187d8e170578bc7c1e84c
AptoSDK: 86f48d3afc08271b23261620f2728a4ec57960b6
AptoUISDK: e959de25e2b185f0f5b260fbb5c7e619b6ce4328
Bond: 87075c7f20f37ea3e73dc7057fce839787bf46eb
Branch: 65d05ffb137ef504777cff6bd4fb6f770f17145a
Differ: 3b6bd78e2b20cc795d9a86f7641d087524e4273e
Expand Down
78 changes: 64 additions & 14 deletions Example/ShiftSDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

@@ -0,0 +1,29 @@
//
// AddCardOnboardingViewTests.swift
// SnapshotTests
//
// Created by Fabio Cuomo on 15/6/21.
// Copyright © 2021 CocoaPods. All rights reserved.
//

import XCTest
import SnapshotTesting
import SnapKit

@testable import AptoUISDK
@testable import AptoSDK

class AddCardOnboardingViewTests: XCTestCase {

func test_addOnboardingView_rendersViewWithInformation() {
let view = AddCardOnboardingView(uiconfig: UIConfig.default)
view.configure(firstParagraph: "You can instantly transfer funds from your existing bank debit card to your <<VALUE>> card account. Please note that transfers are reviewed and they can be delayed or declined if we suspect risks.",
secondParagraph: "This transaction will appear in your bank account statement as: <<VALUE>>")
view.snp.makeConstraints { make in
make.height.equalTo(896)
make.width.equalTo(414)
}
assertSnapshot(matching: view, as: .image)
}

}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,33 @@
//
// ApplePayButtonTests.swift
// SnapshotTests
//
// Created by Fabio Cuomo on 14/4/21.
// Copyright © 2021 CocoaPods. All rights reserved.
//

import XCTest
import SnapshotTesting
import SnapKit
import AptoUISDK

@testable import AptoSDK

class ApplePayButtonTests: XCTestCase {

func test_applePayButton_rendersView() {
let helper = InAppProvisioningHelper()
let buttonView = helper.appleWalletButton()

let view = UIView()
view.backgroundColor = .white
view.addSubview(buttonView)

buttonView.snp.makeConstraints { $0.center.equalToSuperview() }
view.snp.makeConstraints { make in
make.height.equalTo(896)
make.width.equalTo(414)
}
assertSnapshot(matching: view, as: .image)
}
}
@@ -0,0 +1,28 @@
//
// ApplePayRowItemViewTests.swift
// SnapshotTests
//
// Created by Fabio Cuomo on 13/4/21.
// Copyright © 2021 CocoaPods. All rights reserved.
//

import XCTest
import SnapshotTesting
import SnapKit

@testable import AptoUISDK
@testable import AptoSDK

class ApplePayRowItemViewTests: XCTestCase {

func test_applePayRow_rendersView() {
let view = ApplePayRowItemView(with: "card_settings.apple_pay.add_to_wallet.title".podLocalized(),
uiconfig: UIConfig.default)

view.snp.makeConstraints { make in
make.height.equalTo(896)
make.width.equalTo(414)
}
assertSnapshot(matching: view, as: .image)
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions Example/UnitTests/common/Loader/CardLoaderSpy.swift
Expand Up @@ -11,17 +11,29 @@ import Foundation

class CardLoaderSpy: AptoPlatformFake {
private var cardCompletions = [(Result<Card, NSError>) -> Void]()

private var cardProductCompletions = [(Result<CardProduct, NSError>) -> Void]()

var loadCardInfoCallCount: Int {
cardCompletions.count
}

var loadCardProductCallCount: Int {
cardProductCompletions.count
}

override func fetchCard(_ cardId: String, forceRefresh: Bool, retrieveBalances: Bool, callback: @escaping Result<Card, NSError>.Callback) {
cardCompletions.append(callback)
}

override func fetchCardProduct(cardProductId: String, forceRefresh: Bool, callback: @escaping Result<CardProduct, NSError>.Callback) {
cardProductCompletions.append(callback)
}

func completeCardInfoLoading(with card: Card = ModelDataProvider.provider.cardWithACHAccount, at index: Int = 0) {
cardCompletions[index](.success(card))
}

func completeCardProductLoading(with cardProduct: CardProduct = ModelDataProvider.provider.cardProduct, at index: Int = 0) {
cardProductCompletions[index](.success(cardProduct))
}

}
Expand Up @@ -757,4 +757,6 @@ var nextIsShowDetailedCardActivityEnabledResult = true
func orderPhysicalCard(_ cardId: String, callback: @escaping (Result<Card, NSError>) -> Void) {}
func getOrderPhysicalCardConfig(_ cardId: String, callback: @escaping (Result<PhysicalCardConfig, NSError>) -> Void) {}

func startApplePayInAppProvisioning(cardId: String, certificates: [Data], nonce: Data, nonceSignature: Data, callback: @escaping (ApplePayIAPResult) -> Void) {}

}
44 changes: 36 additions & 8 deletions Example/UnitTests/common/ModelDataProvider/ModelDataProvider.swift
Expand Up @@ -230,7 +230,7 @@ class ModelDataProvider {
let features = CardFeatures(setPin: FeatureAction(source: .ivr(ivr), status: .enabled),
getPin: FeatureAction(source: .ivr(ivr), status: .enabled),
allowedBalanceTypes: [balanceType], activation: nil, ivrSupport: ivr, funding: nil,
passCode: nil, achAccount: nil)
passCode: nil, achAccount: nil, inAppProvisioning: nil)
let card = Card(accountId: "card_id",
cardProductId: "card_product_id",
cardNetwork: .other,
Expand Down Expand Up @@ -258,7 +258,7 @@ class ModelDataProvider {
let features = CardFeatures(setPin: FeatureAction(source: .voIP, status: .enabled),
getPin: FeatureAction(source: .voIP, status: .enabled),
allowedBalanceTypes: [balanceType], activation: nil, ivrSupport: ivr, funding: nil,
passCode: nil, achAccount: nil)
passCode: nil, achAccount: nil, inAppProvisioning: nil)
let card = Card(accountId: "card_id",
cardProductId: "card_product_id",
cardNetwork: .other,
Expand Down Expand Up @@ -286,7 +286,7 @@ class ModelDataProvider {
let features = CardFeatures(setPin: FeatureAction(source: .api, status: .enabled),
getPin: FeatureAction(source: .api, status: .enabled),
allowedBalanceTypes: [balanceType], activation: nil, ivrSupport: ivr, funding: nil,
passCode: nil, achAccount: nil)
passCode: nil, achAccount: nil, inAppProvisioning: nil)
let card = Card(accountId: "card_id",
cardProductId: "card_product_id",
cardNetwork: .other,
Expand Down Expand Up @@ -314,7 +314,7 @@ class ModelDataProvider {
let features = CardFeatures(setPin: FeatureAction(source: .api, status: .enabled),
getPin: FeatureAction(source: .ivr(ivr), status: .enabled),
allowedBalanceTypes: [balanceType], activation: nil, ivrSupport: ivr, funding: nil,
passCode: nil, achAccount: nil)
passCode: nil, achAccount: nil, inAppProvisioning: nil)
let card = Card(accountId: "card_id",
cardProductId: "card_product_id",
cardNetwork: .other,
Expand Down Expand Up @@ -343,7 +343,7 @@ class ModelDataProvider {
getPin: FeatureAction(source: .ivr(ivr), status: .enabled),
allowedBalanceTypes: [balanceType], activation: nil, ivrSupport: ivr, funding: nil,
passCode: PassCode(status: .enabled, passCodeSet: false, verificationRequired: true),
achAccount: nil)
achAccount: nil, inAppProvisioning: nil)
let card = Card(accountId: "card_id",
cardProductId: "card_product_id",
cardNetwork: .other,
Expand Down Expand Up @@ -375,7 +375,8 @@ class ModelDataProvider {
isAccountProvisioned: true,
disclaimer: disclaimer,
achAccountDetails: accountDetails)
let features = CardFeatures(setPin: nil, getPin: nil, allowedBalanceTypes: nil, activation: nil, ivrSupport: nil, funding: nil, passCode: nil, achAccount: bankAccount)
let features = CardFeatures(setPin: nil, getPin: nil, allowedBalanceTypes: nil, activation: nil, ivrSupport: nil, funding: nil,
passCode: nil, achAccount: bankAccount, inAppProvisioning: nil)
let card = Card(accountId: "card_id",
cardProductId: "card_product_id",
cardNetwork: .visa,
Expand All @@ -394,7 +395,34 @@ class ModelDataProvider {
verified: nil)
return card
}()


lazy var cardWithFunding: Card = {
let keys = ["evolve_eua"]
let url = URL(string: "https://public-media-prd-usw1-shift.s3-us-west-1.amazonaws.com/developer_portal/disclaimers/instance_issuance_disclaimer.html")!
let content = Content.externalURL(url)
let funding = Funding(status: .enabled,
cardNetworks: [.mastercard],
limits: FundingLimits(daily: FundingSingleLimit(max: Amount(value: 1000, currency: "EUR"))), softDescriptor: "Soft Descriptor")
let features = CardFeatures(setPin: nil, getPin: nil, allowedBalanceTypes: nil, activation: nil, ivrSupport: nil, funding: nil, passCode: nil, achAccount: nil, inAppProvisioning: nil)
let card = Card(accountId: "card_id",
cardProductId: "card_product_id",
cardNetwork: .visa,
cardIssuer: .shift,
cardBrand: "Marvel Card",
state: .active,
cardHolder: "Holder Name",
lastFourDigits: "7890",
spendableToday: nil,
nativeSpendableToday: nil,
totalBalance: nil,
nativeTotalBalance: nil,
kyc: .passed,
orderedStatus: .ordered,
features: features,
verified: nil)
return card
}()

lazy var cardWithDataToRenderACreditCardView: Card = {
let cardBackground = CardBackgroundStyle.color(color: UIColor.colorFromHexString("2f3237") ?? .black)
let style = CardStyle(background: cardBackground, textColor: "ffffff", balanceSelectorImage: nil, cardLogo: nil)
Expand Down Expand Up @@ -456,7 +484,7 @@ class ModelDataProvider {
let features = CardFeatures(setPin: FeatureAction(source: .unknown, status: .enabled),
getPin: FeatureAction(source: .unknown, status: .enabled),
allowedBalanceTypes: [balanceType], activation: nil, ivrSupport: ivr, funding: nil,
passCode: nil, achAccount: nil)
passCode: nil, achAccount: nil, inAppProvisioning: nil)
let card = Card(accountId: "card_id",
cardProductId: "card_product_id",
cardNetwork: .other,
Expand Down
Expand Up @@ -81,6 +81,11 @@ class StorageLocatorFake: StorageLocatorProtocol {
func achAccountStorage(transport: JSONTransport) -> ACHAccountStorageProtocol {
return achAccountStorageSpy
}

lazy var applePayIAPStorageSpy = ApplePayIAPStorageSpy()
func applePayIAPStorage(transport: JSONTransport) -> ApplePayIAPStorageProtocol {
return applePayIAPStorageSpy
}

lazy var cardApplicationStorageSpy = CardApplicationStorageSpy()
func cardApplicationStorage(transport: JSONTransport) -> CardApplicationsStorageProtocol {
Expand Down

0 comments on commit 3f9908e

Please sign in to comment.