chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
703 stars 547 forks source link

Support for ISO18092 tags in iOS #468

Open johanvanawesome opened 2 years ago

johanvanawesome commented 2 years ago

Currently ISO18092 tags can only be scanned on ios using the scanNDef function. This, however does not return tag info, for example the tag id. The scanTag function should do this, but does not. This is due to the line: self.nfcSession = [[NFCTagReaderSession new] initWithPollingOption:(NFCPollingISO14443 | NFCPollingISO15693) delegate:self queue:dispatch_get_main_queue()]; The tag reader session is not polling for 18902 tags.

I propose that the line be changed to initWithPollingOption:(NFCPollingISO14443 | NFCPollingISO15693 | ISOPollingISO18092)

I have tested this in locally on iPhone 8 and 10, and the results are correct.

There will also need to be an update to the docs to inform users about adding the correct entitlement and entries to Info.plist