CardSession does not receive .received(CardSession.APDU) event

I am trying to implement HCE via CardSession. I receive HCE entitlement with these keys "com.apple.developer.nfc.hce", "com.apple.developer.nfc.hce.iso7816.select-identifier-prefixes" and added the select-identifier-prefix for MIFARE. I use the provided implementation from the documentation here https://developer.apple.com/documentation/corenfc/cardsession. and the "Hold Near Reader" view appears and disappears correctly. But when I move the iPhone to the smart card reader the view disappears and the events returned from the cardSession.eventStreams are .readerDetected and readerDeselected, The event received(CardSession.APDU) is never called. When I look at the console logs I found something but I need explanation, why this is causing the issue. _"[NFCardSession validateReceivedAPDU:] AID is disallowed"

Your app can only use and respond to AIDs listed in com.apple.developer.nfc.hce.iso7816.select-identifier-prefixes

The reader is selecting AID F123344556. Is that AID in your list of entitlements?


Argun Tekant /  DTS Engineer / Core Technologies

CardSession does not receive .received(CardSession.APDU) event
 
 
Q