Closed mrados7 closed 3 years ago
Nvm managed to do so with this code:
try {
let tech = Platform.OS === "ios" ? NfcTech.MifareIOS : NfcTech.NfcA;
let resp: any = await NfcManager.requestTechnology(tech, {
alertMessage: "Ready to do some custom Mifare cmd!"
});
console.warn(resp);
// the NFC uid can be found in tag.id
let tag = await NfcManager.getTag();
console.warn(tag);
if (Platform.OS === "ios") {
resp = await NfcManager.sendMifareCommandIOS([0x30, 0x00]);
} else {
resp = await NfcManager.transceive([0x30, 0x00]);
}
console.warn(resp);
cleanUp();
} catch (ex) {
console.warn("ex", ex);
cleanUp();
}
Only mifare classic does not work but that is stated in FAQ.
I am trying to write and read data into the Desfire card, but I am trying to make a react native application that allows this process to take place in the sector I have determined and that the data on the card cannot be changed by others without my permission, but I have not found a useful solution in this regard. I would be very glad if you could help.
So I have tag when scanned by Android NFC Tools app says its type of
NXP MIFARE DESFire
. Technologies available are:Ndef
Android part works, tag is read and I get response like:
But iOS returns just:
So I'm missing id and that's the only thing I need :D. Are there any workarounds for iOS, or some other React Native libs that may work? I know this is not iOS restriction cause other apps are able to get ID of tag.
Thanks in advance!