Contents

createNFCSlot(message:completion:)

Creates an NFC smart card slot using the device’s hardware and presents a system UI.

Declaration

func createNFCSlot(message: String?, completion: @escaping  @Sendable (TKSmartCardSlotNFCSession?, (any Error)?) -> Void)
func createNFCSlot(message: String?) async throws -> TKSmartCardSlotNFCSession

Parameters

  • message:

    Message shown in the system-presented UI

  • completion:

    Completion handler which returns the NFC session of the created slot or an error on failure. If an NFC slot already exists and current caller is not the initial creator TKErrorCodeObjectNotFound error is returned.

Discussion

To finish the NFC session and dismiss the system-presented UI use TKSmartCardSlotNFCSession.endSession.