One Logo Pool Ball
CoreNFC · IOS API REFERENCE

NFCPresentmentIntentAssertion

class · iOS 17.4+ · SDK 27.1

final class NFCPresentmentIntentAssertion

A valid assertion object will suppress presentment intent signaling to the system default NFC contactless app due to user button gesture or presence of an external NFC reader RF field. You can only acquire the assertion when your app is in the foregrounded state. You will need to re-acquire a new assertion if existing instance is invalidated. The assertion will invalidate if: 1) object instance deinit, 2) maximum assertion duration has reached.

Members (2)

static · iOS 17.4+

acquire

TypeScript
static acquire(): Promise<NFCPresentmentIntentAssertion>
Swift declaration
static func acquire() async throws -> NFCPresentmentIntentAssertion

Acquire an assertion from the system. Your app transition into the background state will automatically invalidate the assertion object. `fatalError()` will get triggered if: 1) `isSupported()` returns false. 2) Missing required entitlement.

get · iOS 17.4+

isValid

TypeScript
get isValid(): boolean
Swift declaration
final var isValid: Bool { get }

Returns true if suppression is still valid. Returns false when your app is backgrounded or maximum suppression duration has expired.

Skipped declarations

No declarations were skipped in this snapshot.

All CoreNFC types →