Enable logging in NFC
@@ -72,14 +72,17 @@ public final class IOSNFCCard extends AbstractNFCCard {
}
private void setTag(NFCISO7816Tag tag) {
+ LOG.debug("OETT:setTag");
this.tag = tag;
this.setHistBytes();
}
private void initSessionObj() throws SCIOException {
+ LOG.debug("OETT:initSessionObj");
NFCTagReaderSessionDelegateAdapter delegate = new NFCTagReaderSessionDelegateAdapter() {
@Override
public void didDetectTags(NFCTagReaderSession session, NSArray<?> tags) {
+ LOG.debug("OETT:didDetectTags");
for (NSObject t : tags) {
session.connectToTag((NFCTag) t, (NSError er) -> {
@@ -107,6 +110,7 @@ public final class IOSNFCCard extends AbstractNFCCard {
}
public void connect() throws SCIOException {
+ LOG.debug("OETT:connect");
this.initSessionObj();
this.nfcSession.setAlertMessage(this.dialogMsg);
this.nfcSession.beginSession();
@@ -128,11 +132,13 @@ public final class IOSNFCCard extends AbstractNFCCard {
@Override
public boolean isCardPresent() {
+ LOG.debug("OETT:isCardPresent");
return this.tag != null;
}
@Override
public void terminate(boolean killNfcConnection) throws SCIOException {
+ LOG.debug("OETT:terminate");
this.disconnect(false);
}
@@ -175,6 +181,7 @@ public final class IOSNFCCard extends AbstractNFCCard {
@Override
public byte[] transceive(byte[] apdu) throws IOException {
+ LOG.debug("OETT:transceive");
NFCISO7816APDU isoapdu = new NFCISO7816APDU(new NSData(apdu));
Promise<byte[]> p = new Promise<>();
tag.sendCommandAPDU(isoapdu, (NSData resp, Byte sw1, Byte sw2, NSError er2) -> {
