Interface NFCFeliCaTag

  • All Superinterfaces:
    NFCNDEFTag, NFCTag, NSCoding, NSCopying, NSSecureCoding

    public interface NFCFeliCaTag
    extends NFCTag, NFCNDEFTag
    [@protocol] NFCFeliCaTag A @link NFCTagReaderSession @link/ reader session returns an instance conforming to this protocol when a FeliCa tag is detected. Unless it is specified all block completion handlers are dispatched on the session work queue that is associated with the tag. Your process requires to include the "com.apple.developer.nfc.readersession.formats" entitlement and the "com.apple.developer.nfc.readersession.felica.systemcodes" key in the application's Info.plist to receive this tag object from the @link NFCTagReaderSessionDelegate @link/ delegate. [@link] NFCReaderErrorSecurityViolation @link/ will be returned from the @link NFCTagReaderSessionDelegate @link/ invalidation method if the required entitlement is missing or "com.apple.developer.nfc.readersession.felica.systemcodes" does not contain at least one valid entry. When the reader discovers a FeliCa tag it automatically performs a Polling command using the system code values provided in the "com.apple.developer.nfc.readersession.felica.systemcodes" in the specified array order. System code specified in the array must not contain a wildcard value (0xFF) in the upper or the lower byte, i.e. full matching value is required. The tag is returned from the [NFCTagReaderSessionDelegate readerSession:didDetectTags:] call on the first successful Polling command matching one of the system codes. Tag will not be returned to the NFCTagReaderSessionDelegate if no matching system is found based on entries listed in the Info.plist. Tag must be in the connected state for NFCNDEFTag protocol properties and methods to work correctly.
    • Method Detail

      • currentIDm

        NSData currentIDm()
        [@property] currentIDm Manufacturer ID of the currently selected system. Value is updated on each Polling command execution. It will be empty if system selection fails.
      • currentSystemCode

        NSData currentSystemCode()
        [@property] currentSystemCode The system code most recently selected by the reader using the Polling command. This will match one of the entries in the "com.apple.developer.nfc.readersession.felica.systemcodes" in the Info.plist.
      • pollingWithSystemCodeRequestCodeTimeSlotCompletionHandler

        void pollingWithSystemCodeRequestCodeTimeSlotCompletionHandler​(NSData systemCode,
                                                                       long requestCode,
                                                                       long timeSlot,
                                                                       NFCFeliCaTag.Block_pollingWithSystemCodeRequestCodeTimeSlotCompletionHandler completionHandler)
        pollingWithSystemCode:requestCode:timeSlot:completionHandler: Polling command defined by FeliCa card specification. Refer to the FeliCa specification for details. System code must be one of the provided values in the "com.apple.developer.nfc.readersession.felica.systemcodes" in the Info.plist; @link NFCReaderErrorSecurityViolation @link/ will be returned when an invalid system code is used. Polling with wildcard value in the upper or lower byte is not supported.
        Parameters:
        systemCode - Designation of System Code. Wildcard value (0xFF) in the upper or the lower byte is not supported.
        requestCode - Designation of Requset Data output.
        timeSlot - Maximum number of slots possible to respond.
        completionHandler - Completion handler called when the operation is completed. error is nil if the contactless transceive operation succeeds, else all other return values shall be ignored. Non-zero length requestData is return when requestCode is a non-zero parameter and feature is supported by the tag. The @link currentIDM @link/ property will be updated on each execution, except when an invalid systemCode is provided and the existing selected system will stay selected.
      • readWithoutEncryptionWithServiceCodeListBlockListCompletionHandler

        void readWithoutEncryptionWithServiceCodeListBlockListCompletionHandler​(NSArray<? extends NSData> serviceCodeList,
                                                                                NSArray<? extends NSData> blockList,
                                                                                NFCFeliCaTag.Block_readWithoutEncryptionWithServiceCodeListBlockListCompletionHandler completionHandler)
        readWithoutEncryptionWithServiceCodeList:blockList:completionHandler: Read Without Encrypton command defined by FeliCa card specification. Refer to the FeliCa specification for details.
        Parameters:
        serviceCodeList - Service Code list represented in a NSArray of NSData objects. Number of nodes specified should be between 1 to 16 inclusive. Each service code should be 2 bytes stored in Little Endian format.
        blockList - Block List represent in a NSArray of NSData objects. 2-Byte or 3-Byte block list element is supported.
        completionHandler - Completion handler called when the operation is completed. error is nil if the contactless transceive operation succeeds, else all other return values shall be ignored. Valid read data blocks (block length of 16 bytes) are returned in NSArray of NSData objects when Status Flag 1 equals zero.
      • requestResponseWithCompletionHandler

        void requestResponseWithCompletionHandler​(NFCFeliCaTag.Block_requestResponseWithCompletionHandler completionHandler)
        requestResponseWithCompletionHandler: Request Response command defined by FeliCa card specification. Refer to the FeliCa specification for details.
        Parameters:
        completionHandler - Completion handler called when the operation is completed. error is nil if the contactless transceive operation succeeds, else all other return values shall be ignored. Valid mode value ranges from 0 to 3 inclusively.
      • requestServiceV2WithNodeCodeListCompletionHandler

        void requestServiceV2WithNodeCodeListCompletionHandler​(NSArray<? extends NSData> nodeCodeList,
                                                               NFCFeliCaTag.Block_requestServiceV2WithNodeCodeListCompletionHandler completionHandler)
        requestServiceV2WithNodeCodeList:completionHandler: Request Service V2 command defined by FeliCa card specification. Refer to the FeliCa specification for details.
        Parameters:
        nodeCodeList - Node Code list represent in a NSArray of NSData. Number of nodes specified should be between 1 to 32 inclusive. Each node code should be 2 bytes stored in Little Endian format.
        completionHandler - Completion handler called when the operation is completed. error is nil if the contactless transceive operation succeeds, else all other return values shall be ignored. encryptionIdentifier value shall be ignored if Status Flag 1 value indicates an error. nodeKeyVerionListAES and nodeKeyVersionListDES may be empty depending on the Status Flag 1 value and the Encryption Identifier value. The 2 bytes node key version (AES and DES) is in Little Endian format.
      • requestServiceWithNodeCodeListCompletionHandler

        void requestServiceWithNodeCodeListCompletionHandler​(NSArray<? extends NSData> nodeCodeList,
                                                             NFCFeliCaTag.Block_requestServiceWithNodeCodeListCompletionHandler completionHandler)
        requestServiceWithNodeCodeList:completionHandler: Request Service command defined by FeliCa card specification. Refer to the FeliCa specification for details.
        Parameters:
        nodeCodeList - Node Code list represented in a NSArray of NSData objects. Number of nodes specified should be between 1 to 32 inclusive. Each node code should be 2 bytes stored in Little Endian format.
        completionHandler - Completion handler called when the operation is completed. error is nil if the contactless transceive operation succeeds, else all other return values shall be ignored. Node key version list is return as NSArray of NSData objects, and each data object is stored in Little Endian format per FeliCa specification.
      • requestSpecificationVersionWithCompletionHandler

        void requestSpecificationVersionWithCompletionHandler​(NFCFeliCaTag.Block_requestSpecificationVersionWithCompletionHandler completionHandler)
        requestSpecificationVersionWithCompletionHandler: Request Specification Verison command defined by FeliCa card specification. This command supports response format version `00`h. Refer to the FeliCa specification for details.
        Parameters:
        completionHandler - Completion handler called when the operation is completed. error is nil if the contactless transceive operation succeeds, else all other return values shall be ignored. basicVersion and optionVersion may be empty depending on the Status Flag 1 value and if the tag supports AES/DES.
      • requestSystemCodeWithCompletionHandler

        void requestSystemCodeWithCompletionHandler​(NFCFeliCaTag.Block_requestSystemCodeWithCompletionHandler completionHandler)
        requestSystemCodeWithCompletionHandler: Request System Code command defined by FeliCa card specification. Refer to the FeliCa specification for details.
        Parameters:
        completionHandler - Completion handler called when the operation is completed. error is nil if the contactless transceive operation succeeds, else all other return values shall be ignored. Each system code is 2 bytes stored in Little Endian format.
      • resetModeWithCompletionHandler

        void resetModeWithCompletionHandler​(NFCFeliCaTag.Block_resetModeWithCompletionHandler completionHandler)
        resetModeWithCompletionHandler: Reset Mode command defined by FeliCa card specification. Refer to the FeliCa specification for details.
        Parameters:
        completionHandler - Completion handler called when the operation is completed. error is nil if the contactless transceive operation succeeds, else all other return values shall be ignored.
      • sendFeliCaCommandPacketCompletionHandler

        void sendFeliCaCommandPacketCompletionHandler​(NSData commandPacket,
                                                      NFCFeliCaTag.Block_sendFeliCaCommandPacketCompletionHandler completionHandler)
        sendFeliCaCommandPacket:completionHandler: Transmission of FeliCa Command Packet Data at the applicaiton layer. Refer to the FeliCa specification for details. Manufacturer ID (IDm) of the currently selected system can be read from the currentIDm property.
        Parameters:
        commandPacket - Command packet send to the FeliCa card. Maximum packet length is 254. Data length (LEN) byte and CRC bytes are calculated and inserted automatically to the provided packet data frame.
        completionHandler - Completion handler called when the operation is completed. error is nil if operation succeeds. A @link NFCErrorDomain @link/ error is returned when there is a communication issue with the tag.
      • writeWithoutEncryptionWithServiceCodeListBlockListBlockDataCompletionHandler

        void writeWithoutEncryptionWithServiceCodeListBlockListBlockDataCompletionHandler​(NSArray<? extends NSData> serviceCodeList,
                                                                                          NSArray<? extends NSData> blockList,
                                                                                          NSArray<? extends NSData> blockData,
                                                                                          NFCFeliCaTag.Block_writeWithoutEncryptionWithServiceCodeListBlockListBlockDataCompletionHandler completionHandler)
        writeWithoutEncryptionWithServiceCodeList:blockList:blockData:completionHandler: Write Without Encrypton command defined by FeliCa card specification. Refer to the FeliCa specification for details.
        Parameters:
        serviceCodeList - Service Code list represented in a NSArray of NSData objects. Number of nodes specified should be between 1 to 16 inclusive. Each service code should be 2 bytes stored in Little Endian format.
        blockList - Block List represent in a NSArray of NSData objects. Total blockList items and blockData items should match. 2-Byte or 3-Byte block list element is supported.
        blockData - Block data represent in a NSArray of NSData objects. Total blockList items and blockData items should match. Data block should be 16 bytes in length.
        completionHandler - Completion handler called when the operation is completed. error is nil if the contactless transceive operation succeeds, else all other return values shall be ignored.