AsReaderNFCDevice

sharedInstance

Creates and initializes an AsReaderNFCDevice object (Singleton pattern).

+ (instancetype)sharedInstance;

Return Value

Type

Description

instancetype

An AsReaderNFCDevice object


sendData

Sends data.

- (BOOL)sendData:(NSData *)sendData;

Parameters

Name

Type

Description

sendData

NSData

Data to send

Return Value

Type

Description

BOOL

Method execution result: YES = success, NO = failure


startScan

Starts the AsReader NFC scan.
After executing this method, the result is called back via receivedScanData.

- (BOOL)startScan;

Return Value

Type

Description

BOOL

Method execution result: YES = success, NO = failure


stopScan

Stops scanning NFC tags on the AsReader device.

- (BOOL)stopScan;

Return Value

Type

Description

BOOL

Method execution result: YES = success, NO = failure


readMultiBlockWithBlockIndex:count:

Reads multiple consecutive blocks of data on the IC tag memory with the specified UID.
After executing this method, the result is called back via nfcReadMultiBlockReceived.

- (BOOL)readMultiBlockWithBlockIndex:(int)index count:(int)count;

Parameters

Name

Type

Description

index

int

Starting block number (0–255)

count

int

Number of blocks to read (0–255)

Return Value

Type

Description

BOOL

Method execution result: YES = success, NO = failure


writeSingleBlockWithBlockIndex:writeData:uid:

Writes data to a specified block in the IC tag memory with the specified UID.
After executing this method, the result is called back via nfcWriteSingleBlockStatusCode.

- (BOOL)writeSingleBlockWithBlockIndex:(int)index writeData:(NSData *)writeData uid:(NSData *)uid;

Parameters

Name

Type

Description

index

int

Starting block number (0–255)

writeData

NSData

Data to write (each block size is 4 bytes)

uid

NSData

NFC tag UID data

Return Value

Type

Description

BOOL

Method execution result: YES = success, NO = failure


writeBytesWithBlockIndex:writeData:uid:

Writes data of specified byte length starting from the specified block with the specified UID.
After executing this method, the result is called back via nfcWriteBytesStatusCode.

- (BOOL)writeBytesWithBlockIndex:(int)index writeData:(NSData *)writeData uid:(NSData *)uid;

Parameters

Name

Type

Description

index

int

Starting block number (0–255)

writeData

NSData

Data to write (each block size is 4 bytes)

uid

NSData

NFC tag UID data

Return Value

Type

Description

BOOL

Method execution result: YES = success, NO = failure


setInventoryTime

Sets the reading time.

- (BOOL)setInventoryTime:(float)inventoryTime;

Parameters

Name

Type

Description

inventoryTime

float

Inventory time

Return Value

Type

Description

BOOL

Method execution result: YES = success, NO = failure