flutter-nfc-manager
flutter-nfc-manager copied to clipboard
iOS ISO7816Tag.sendCommand : error invalid_parameter, Tag is not found
I have a requirement to continuously send sendCommand, but I received an error Tag that is not found. I need to improve it urgently
I can confirm that implementing OC like the following can effectively obtain the data I want
- (void)getPubkeyWith:(id<NFCISO7816Tag>)tag
{
NFCISO7816APDU * iso = [[NFCISO7816APDU alloc] initWithInstructionClass:0 instructionCode:0x0F p1Parameter:0 p2Parameter:0 data:data expectedResponseLength:-1];
[tag sendCommandAPDU:iso completionHandler:^(NSData * _Nonnull responseData, uint8_t sw1, uint8_t sw2, NSError * _Nullable error) {
if (error != nil) {
self.xpubCount++;
[self.xpubDataArray addObject:responseData];
if (self.xpubCount < 5) {
[self getPubkeyWith:tag];
} else {
// complete
}
} else {
// end
}
}];
}