ios13 Missing required entitlement for NFCTagReaderSession

I'm diving into iOS 13's new CoreNFC capabilities, and I'm struggling to get NFCTagReaderSession working. After setting up my entitlements and instantiating an NFCTagReaderSession and delegate I attempt to start the session by calling

nfcTagReaderSession?.begin()
. My session immediately gets invalidated with this error:


Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement}


I have updated my distribution profile accordingly , I have followed the documentation here for my entitlements file: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_nfc_readersession_formats

I have also added the appropriate "Privacy - NFC Scan Usage Description" in my Info.plist.


My developement profile contains only one string "NDEF" when I enable NFC reading in capabilities.


Has anyone gotten this to work yet? Is this just a problem with Xcode 11 or iOS 13?

Replies

I managed to use NFCTagReaderSession to read Mifare cards... instead of NDEF in the entitlements file, try using TAG.