iOS/Sources/App/Settings/NFC/SimulatorNFCManager.swift

20 lines
396 B
Swift

import Foundation
import PromiseKit
import Shared
#if targetEnvironment(simulator)
final class SimulatorTagManager: iOSTagManager {
override var isNFCAvailable: Bool {
true
}
override func readNFC() -> Promise<String> {
.value(UUID().uuidString.lowercased())
}
override func writeNFC(value: String) -> Promise<String> {
.value(value)
}
}
#endif