This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import CoreNFC | |
| import RxSwift | |
| class NFCWriteManager: NSObject, NFCWriteService, NFCTagReaderSessionDelegate { | |
| private var session: NFCReaderSession? | |
| private let disposeBag = DisposeBag() | |
| private vat code: String? | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import CoreNFC | |
| import RxSwift | |
| import RxCocoa | |
| private enum TransceiveType: UInt8 { | |
| case read = 0x30 | |
| case write = 0xA2 | |
| case auth = 0x1B | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| #if canImport(CoreNFC) | |
| import CoreNFC | |
| #endif | |
| class NFCScanningManager: NSObject { | |
| fileprivate var session: NFCReaderSession? | |
| var isAvailable: Bool { | |
| return NFCNDEFReaderSession.readingAvailable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension String { | |
| /// Gets a Dutch surname prefix | |
| /// | |
| /// ``` | |
| /// var name = "van Kuijck" | |
| /// name.getSurnamePrefix() // <= "van" | |
| /// name // <= "Kuijck" | |
| /// ``` | |
| /// - see: https://nl.wikipedia.org/wiki/Tussenvoegsel | |
| /// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension String { | |
| /// Check if a string is a valid BSN | |
| /// | |
| /// - parameters: | |
| /// - bsn: `String` The BSN number | |
| /// | |
| /// For more information [check this link](https://nl.wikipedia.org/wiki/Burgerservicenummer). | |
| /// | |
| /// - returns `Bool` Valid or invalid | |
| /// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import UIKit | |
| import RxSwift | |
| import RxCocoa | |
| class BaseViewController: UIViewController { | |
| lazy var disposeBag = DisposeBag() | |
| } | |
| protocol ViewModelControllable: class { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| import RxSwift | |
| import RxCocoa | |
| class LoginViewController: BaseViewController, ViewModelControllable { | |
| @IBOutlet private weak var loginButton: UIButton! | |
| @IBOutlet private weak var activityIndicator: UIActivityIndicatorView! | |
| @IBOutlet private weak var emailTextField: UITextField! | |
| @IBOutlet private weak var passwordTextField: UITextField! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import RxSwift | |
| import RxCocoa | |
| protocol ViewModalable: class { | |
| init() | |
| } | |
| class BaseViewModel: ViewModalable { | |
| lazy var disposeBag = DisposeBag() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import RxSwift | |
| class LoginViewModel: BaseViewModel { | |
| struct Input { | |
| let willSignIn: AnyObserver<Void> | |
| let email: AnyObserver<String?> | |
| let password: AnyObserver<String?> | |
| fileprivate let didTapSignInSubject = PublishSubject<Void>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import UIKit | |
| import RxSwift | |
| protocol SignInListener { | |
| func didSignIn() | |
| } | |
| class LoginCoordinator: BaseCoordinator { | |
| override func start() { |
NewerOlder