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 ?

Yes, I just verified. It's in the 2019 Core NFC Enhancements video at time point 9:00.


"However, for the time being, reading payment cards will not be supported."


Presumably they want to encourage Apple Pay as the only kind of payment handling the phone engages in.

I have problem, when I'm trying connect session to detected tag.

I use NFCTagReaderSession(pollingOption: .iso14443, delegate: self)


Xcode 11 beta 4 and iPhone XS Max iOS 13 beta 4, Xcode 11 beta 5 and iPhone XS Max iOS 13 beta 5


public func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) {
        
        Log.debug( "tagReaderSession:didDetect - \(tags[0])" )
        if tags.count > 1 {
            session.alertMessage = "More than 1 tags was found. Please present only 1 tag."
            return
        }
        
        let tag = tags.first!
        var passportTag: NFCISO7816Tag
        switch tags.first! {
        case let .iso7816(tag):
            passportTag = tag
        default:
            session.invalidate(errorMessage: "Tag not valid.")
            return
        }
     
        // Connect to tag
        session.connect(to: tag) { [unowned self] (error: Error?) in
            if error != nil {
               
                session.invalidate(errorMessage: "Connection error. Please try again.")
                return
            }

When delegate method detect tag and run session.connect(to: tag), I have such error

tagReaderSessionDidBecomeActive

tagReaderSession:didDetect - iso7816(<NFCISO7816Tag: 0x281124f30>)

2019-07-31 13:00:06.271219+0300 NFCPassportReaderApp[308:16921] [CoreNFC] 00000002 83148680 -[NFCTagReaderSession _connectTag:error:]:553 Error Domain=NFCError Code=100 "Stack Error" UserInfo={NSLocalizedDescription=Stack Error, NSUnderlyingError=0x281125e90 {Error Domain=nfcd Code=28 "Tag Not Found" UserInfo={NSLocalizedDescription=Tag Not Found}}}



Does anybody had such problem and know how to fix it?

Is there a list of AIDs supported by CoreNFC?

Hi Aleksandr, I have a similar issue with reading a smart card - returns code = 29 "Tag Error"

wait.. adding to PLIST or Entitlements?


I added to plist and seems to work, but docs state we must add to entitlements...

so the way is plist, not entitlements....

Can you read a eID?
CoreNFC ISO7816 Tags
 
 
Q