3. Gestionar NFCPresentmentIntentAssertion
import CoreNFC
@available(iOS 17.4, *)
class PresentmentIntentWrapper {
static var presentmentIntent: NFCPresentmentIntentAssertion?
static func acquire() async throws {
presentmentIntent = try await NFCPresentmentIntentAssertion.acquire()
}
static func isValid() -> Bool {
guard let presentmentIntent else {
return false
}
return presentmentIntent.isValid
}
}Última actualización
¿Te fue útil?