Skip to content

Commit

Permalink
3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
adyen-git-manager committed Apr 2, 2020
1 parent acbb924 commit 0a9abc1
Show file tree
Hide file tree
Showing 238 changed files with 3,246 additions and 394 deletions.
2 changes: 2 additions & 0 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ custom_categories:
- CardTypeDetector
- CardExpiryDateFormatter
- CardExpiryDateValidator
- CardSecurityCodeFormatter
- CardSecurityCodeValidator
- CardNumberFormatter
- CardNumberValidator
- name: Qiwi Wallet Component
Expand Down
2 changes: 1 addition & 1 deletion Adyen.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Adyen'
s.version = '3.4.0'
s.version = '3.4.1'
s.summary = "Adyen Components for iOS"
s.description = <<-DESC
Adyen Components for iOS allows you to accept in-app payments by providing you with the building blocks you need to create a checkout experience.
Expand Down
24 changes: 12 additions & 12 deletions Adyen.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2619,7 +2619,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 3.4.0;
CURRENT_PROJECT_VERSION = 3.4.1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -2683,7 +2683,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 3.4.0;
CURRENT_PROJECT_VERSION = 3.4.1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -2714,7 +2714,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = B2NYSS5932;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.4.0;
DYLIB_CURRENT_VERSION = 3.4.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Adyen/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2737,7 +2737,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = B2NYSS5932;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.4.0;
DYLIB_CURRENT_VERSION = 3.4.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Adyen/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -2800,7 +2800,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = B2NYSS5932;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.4.0;
DYLIB_CURRENT_VERSION = 3.4.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = AdyenCard/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2821,7 +2821,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = B2NYSS5932;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.4.0;
DYLIB_CURRENT_VERSION = 3.4.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = AdyenCard/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -2882,7 +2882,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = B2NYSS5932;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.4.0;
DYLIB_CURRENT_VERSION = 3.4.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = AdyenDropIn/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2905,7 +2905,7 @@
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = B2NYSS5932;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.4.0;
DYLIB_CURRENT_VERSION = 3.4.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = AdyenDropIn/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -2925,11 +2925,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3.4.0;
CURRENT_PROJECT_VERSION = 3.4.1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = B2NYSS5932;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.4.0;
DYLIB_CURRENT_VERSION = 3.4.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = AdyenWeChatPay/Info.plist;
Expand Down Expand Up @@ -2968,11 +2968,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3.4.0;
CURRENT_PROJECT_VERSION = 3.4.1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = B2NYSS5932;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.4.0;
DYLIB_CURRENT_VERSION = 3.4.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = AdyenWeChatPay/Info.plist;
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.4.0</string>
<string>3.4.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
14 changes: 14 additions & 0 deletions Adyen/UI/Form/Items/Text/FormTextItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ public extension FormTextItemView {
/// So in order to prevent this behaviour,
/// accessibilityValue is overriden to return an empty string in case the text var is nil or empty string.
private final class TextField: UITextField {

private var heightConstraint: NSLayoutConstraint?

var disablePlaceHolderAccessibility: Bool = true

/// Executed when the view resigns as first responder.
Expand All @@ -286,6 +289,17 @@ private final class TextField: UITextField {
}
}

override var font: UIFont? {
didSet {
heightConstraint = heightConstraint ?? heightAnchor.constraint(equalToConstant: 0)
let sizeToFit = sizeThatFits(CGSize(width: bounds.width,
height: UIView.layoutFittingExpandedSize.height))
heightConstraint?.constant = sizeToFit.height + 1
heightConstraint?.priority = .defaultHigh
heightConstraint?.isActive = true
}
}

override func resignFirstResponder() -> Bool {
let result = super.resignFirstResponder()
onDidResignFirstResponder?()
Expand Down
2 changes: 1 addition & 1 deletion Adyen/UI/Form/Items/Value/FormValueItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ open class FormValueItemView<ItemType: FormValueItem>: FormItemView<ItemType>, A
}

if isEditing != oldValue {
FormPhoneNumberItemView.cancelPreviousPerformRequests(withTarget: self)
Self.cancelPreviousPerformRequests(withTarget: self)
perform(#selector(didChangeEditingStatus), with: nil, afterDelay: 0.1)
}
}
Expand Down
4 changes: 2 additions & 2 deletions Adyen/Utilities/LengthValidator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import Foundation
open class LengthValidator: Validator {

/// The minimum length of the string.
public let minimumLength: Int?
open var minimumLength: Int?

/// The maximum length of the string.
public let maximumLength: Int?
open var maximumLength: Int?

/// Initializes the length validator.
///
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Validators/NumericStringValidator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import Foundation

/// Validates a phone number.
public final class NumericStringValidator: LengthValidator {
open class NumericStringValidator: LengthValidator {

/// :nodoc:
public override func isValid(_ value: String) -> Bool {
Expand Down
4 changes: 2 additions & 2 deletions AdyenCard/Formatters/CardSecurityCodeFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import Foundation

/// Formats a card's security code (CVC/CVV).
internal final class CardSecurityCodeFormatter: NumericFormatter, Observer {
public final class CardSecurityCodeFormatter: NumericFormatter, Observer {

/// Indicate is validating CVV belong to a Amex card
private var cardType: CardType?
Expand All @@ -24,7 +24,7 @@ internal final class CardSecurityCodeFormatter: NumericFormatter, Observer {

/// :nodoc:
public override func formattedValue(for value: String) -> String {
let value = sanitizedValue(for: value)
let value = super.formattedValue(for: value)

if value.count > expectedLength {
return String(value.prefix(expectedLength))
Expand Down
2 changes: 1 addition & 1 deletion AdyenCard/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.4.0</string>
<string>3.4.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
24 changes: 12 additions & 12 deletions AdyenCard/Validators/CardSecurityCodeValidator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@
import Foundation

/// Validates a card's security code.
internal final class CardSecurityCodeValidator: Validator, Observer {

/// Indicate is validating CVV belong to a Amex card
private var cardType: CardType?
private var expectedLength: Int { cardType == CardType.americanExpress ? 4 : 3 }
public final class CardSecurityCodeValidator: NumericStringValidator, Observer {

/// Initiate new instance of CardSecurityCodeValidator
/// - Parameter publisher: observer of a card type
/// - Parameter publisher: Observable of a card type
public init(publisher: Observable<CardType?>? = nil) {
super.init(minimumLength: 3, maximumLength: 4)
guard let publisher = publisher else { return }

bind(publisher, to: self, at: \.cardType)
updateExpectedLength(from: publisher.value)

observe(publisher) { [weak self] cardType in
self?.updateExpectedLength(from: cardType)
}
}

/// :nodoc:
public func isValid(_ string: String) -> Bool {
return string.count == expectedLength
private func updateExpectedLength(from cardType: CardType?) {
let length = cardType == .americanExpress ? 4 : 3
maximumLength = length
minimumLength = length
}

/// :nodoc:
public func maximumLength(for value: String) -> Int { expectedLength }
}
2 changes: 1 addition & 1 deletion AdyenDropIn/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.4.0</string>
<string>3.4.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion AdyenTests/Card Tests/Form/FormCardNumberItemTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class FormCardNumberItemTests: XCTestCase {
XCTAssertEqual(amex.isHidden.value, false)
XCTAssertEqual(cup.isHidden.value, true)
XCTAssertEqual(maestro.isHidden.value, true)

// When typing common pattern, all matching cards should be visible.
item.value = "62"
XCTAssertEqual(visa.isHidden.value, true)
Expand Down
2 changes: 1 addition & 1 deletion AdyenTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>3.4.0</string>
<string>3.4.1</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion AdyenUIHost/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.4.0</string>
<string>3.4.1</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand Down
2 changes: 1 addition & 1 deletion AdyenWeChatPay/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.4.0</string>
<string>3.4.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
8 changes: 7 additions & 1 deletion Docs/3D Secure 2 Component.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@
<li class="nav-group-task">
<a class="nav-group-task-link" href="Card%20Component.html#/s:5Adyen23CardExpiryDateValidatorC">CardExpiryDateValidator</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardSecurityCodeFormatter.html">CardSecurityCodeFormatter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardSecurityCodeValidator.html">CardSecurityCodeValidator</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardNumberFormatter.html">CardNumberFormatter</a>
</li>
Expand Down Expand Up @@ -580,7 +586,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2020 <a class="link" href="https://adyen.com" target="_blank" rel="external">Adyen</a>. All rights reserved. (Last updated: 2020-03-26)</p>
<p>&copy; 2020 <a class="link" href="https://adyen.com" target="_blank" rel="external">Adyen</a>. All rights reserved. (Last updated: 2020-04-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
Expand Down
8 changes: 7 additions & 1 deletion Docs/Apple Pay Component.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@
<li class="nav-group-task">
<a class="nav-group-task-link" href="Card%20Component.html#/s:5Adyen23CardExpiryDateValidatorC">CardExpiryDateValidator</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardSecurityCodeFormatter.html">CardSecurityCodeFormatter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardSecurityCodeValidator.html">CardSecurityCodeValidator</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardNumberFormatter.html">CardNumberFormatter</a>
</li>
Expand Down Expand Up @@ -553,7 +559,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2020 <a class="link" href="https://adyen.com" target="_blank" rel="external">Adyen</a>. All rights reserved. (Last updated: 2020-03-26)</p>
<p>&copy; 2020 <a class="link" href="https://adyen.com" target="_blank" rel="external">Adyen</a>. All rights reserved. (Last updated: 2020-04-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
Expand Down
8 changes: 7 additions & 1 deletion Docs/BCMC Component.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@
<li class="nav-group-task">
<a class="nav-group-task-link" href="Card%20Component.html#/s:5Adyen23CardExpiryDateValidatorC">CardExpiryDateValidator</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardSecurityCodeFormatter.html">CardSecurityCodeFormatter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardSecurityCodeValidator.html">CardSecurityCodeValidator</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardNumberFormatter.html">CardNumberFormatter</a>
</li>
Expand Down Expand Up @@ -524,7 +530,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2020 <a class="link" href="https://adyen.com" target="_blank" rel="external">Adyen</a>. All rights reserved. (Last updated: 2020-03-26)</p>
<p>&copy; 2020 <a class="link" href="https://adyen.com" target="_blank" rel="external">Adyen</a>. All rights reserved. (Last updated: 2020-04-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
Expand Down
8 changes: 7 additions & 1 deletion Docs/Base Component.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@
<li class="nav-group-task">
<a class="nav-group-task-link" href="Card%20Component.html#/s:5Adyen23CardExpiryDateValidatorC">CardExpiryDateValidator</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardSecurityCodeFormatter.html">CardSecurityCodeFormatter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardSecurityCodeValidator.html">CardSecurityCodeValidator</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/CardNumberFormatter.html">CardNumberFormatter</a>
</li>
Expand Down Expand Up @@ -830,7 +836,7 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2020 <a class="link" href="https://adyen.com" target="_blank" rel="external">Adyen</a>. All rights reserved. (Last updated: 2020-03-26)</p>
<p>&copy; 2020 <a class="link" href="https://adyen.com" target="_blank" rel="external">Adyen</a>. All rights reserved. (Last updated: 2020-04-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</body>
Expand Down
Loading

0 comments on commit 0a9abc1

Please sign in to comment.