CoreNFC ISO7816 Tags

I've trying to scan a biometric passport with the new NFCTagReaderSession, without success : NFCReaderSession.readingAvailable return false with an error "invalid parameter" from nfcd...


Anyone having success with NFCTagReaderSession ?

I have the same problem. I read with success Mifare tag but i cannot read .iso14443 / .iso7816 tag. I don't know the reason.

Did you try calling NFCTagReaderSession.readingAvailable instead of NFCReaderSession.readingAvailable?

Can you read a ePassport or eID?

No luck so far, I can set up and start the session but the delegate’s tagReaderSession(didDetect:) callback never fires.

tagReaderSession(didDetect:) is fired in my case with a Mifare tag but bothing happens with eID, Passport, credit card (iso14443). Maybe friday we'll have more details here.

I've just spoken to a CoreNFC engineer and in my case the problem was that the ICAO-9303 Application Identifier was missing from the "ISO7816 application identifiers for NFC Tag Reader Session" array in the app's Info.plist file: now the callback is fired when I scan my passport

I was able to read Mifare cards (Toronto's transit card). But unable to use the com.apple.developer.nfc.readersession.iso7816.select-identifiers property.


Not sure how to specify the AID I would like to support... any hints?


https://developer.apple.com/documentation/bundleresources/information_property_list/select-identifiers?language=objc

Same for me, only callback with Mifare

Try adding this to your info.plist to read the ePassport

<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
</array>


A0000002471001 is the AID of the ePassport NFC chip

To get the tag to detect, you need to look for the correct AID (Application Identifier).


In Your apps plist file, you need to add: ISO-7816 application identifiers for NFC Tag Reader Session


And then add the passport AID which is A000 0002 4710 01 (without the spaces).

I beileve that for e.g a payment application it would be:

325041592E5359532E4444463031

For visa it would be: A0000000031010,

For mastercard it would be: A0000000041010.


In my tests I can (on one iPhone 7+) get a callback in TagDiscovered, but it erroneously reports the tag as a Mifare (it isn't).

On another iPhone 7+ I get no call back with identical app & card.

Besides the A** AID I found on the internet that would be necessary to add a string of zero's as well

Did you try that?


<string>00000000000000</string>

I've just released a sample app demoing passport reading using the iOS 13 CoreNFC apis - supports BAC, SecureMessaging and reads DG1 and DG2 groups.


github.com/AndyQ/NFCPassportReader


May help people get started. Would welcome comments and improvements!

Hey AndyQ, thanks for the effort! As I''m trying to get your demo to work, I'm running into several problems during build:


: the Package.resolved file is most likely severely out-of-date and is preventing correct resolution; delete the resolved file and try again


x-xcode-log://AC508F87-ABC0-467C-9583-1C6B600C6FCD Missing package product 'NFCPassportReader', please fix package resolution errors before building



What I see is that the Package.resolved file is being created everytime I am trying to run. And as for the second error messag: I didnt move any folders, so I'm not sure why it wouldnt find the Package.

Any advice?


Thank you!

I think I've resolved this already but if anyone else is having this issue - check your XCode version - you get this error if you are Beta 1. You need to be on Beta 2

Hi Andy,


Thanks you for sharing.

Have you tried Hong Kong Passport?

Thank you.

My colleague and I ran both Apple's and AndyQ's examples on an iPhone XR but it won't read anything – we tried passports, ID cards and credit cards. We have enabled the NFC entitlement, added it in the app, added all the tags suggested above in the info.plist – but nothing changes, even though `readingAvailable` returns `true`. We are using Xcode 11 beta 2. Any clue what we are missing?

I see the same error with "Version 11.0 beta 2 (11M337n)"

Hey @Andy, same is happeing here with Xcode Version 11.0 beta 2 (11M337n)
and the MacOS 10.15 Beta (19A487m)

It wont happen if you check out using git. Only happened to me when downlaoding the zip and extracting it.

You are right...I already have that fix.
But now I am having the same issue as some other persons are talking I don't receive any call back even if using the iPhone XS

I ran AndyQ's example with ePassport (AID A0000002471001) and got an error on connect to tag:

Error Domain=NFCError Code=100 "Stack Error"

Error Domain=nfcd Code=28 "Tag Not Found"

iPhone X, iOS 13 beta 4, Xcode 11 beta 4

Anybody had luck reading a credit card? My app is not called back on an iPhone 7 with beta 4 - and I verified the aid in the info.plist is correct ( https://github.com/tengelmeier/cardbrowser-swift/ )

I thought the video presentation mentioned that known payment card AIDs would be ignored/banned?

*Sigh* Seem to have missed that in the Session video, and it's not in the docs.

CoreNFC ISO7816 Tags
 
 
Q