The root issues is a missing entitlement error. I've jumped through countless hoops of checking/rechecking .entitlement file/plist file, creating new credentials, creating new projects, creating new provisioning profiles with no luck, manual signing, automatic signing. Any suggestions appreciated.
Looking at the Provisioning Profile Info shows NFC Tag capabilities is included and NFC Entitlements are included.
I'm at a loss...
I am including the following:
- Pertinent output from console
- Current Info.Plist
- Current .entitlement file
Here are the pertinent sectsis the Console Log for reference:
... NFCConnectionManager[0x074d6e40].tagReaderSessionDidBecomeActive(:): NFCTagReaderSessionDelegate: Session did become active NFCConnectionManager[0x074d6e40].tagReaderSession(:didDetect:): NFCTagReaderSessionDelegate: Session didDetectTags – 1 tags NFCConnectionManager[0x074d6e40].connected(session:tag:): Manager.connected(session:tag:) - tag: 7 bytes NFCConnection.Type.connection(): NFCConnection.connection() – connection established DEBUG: Successfully established YubiKit NFCConnection. DEBUG: UI updated: 'YubiKey connected... Performing challenge-response...' DEBUG: Sending APDU to select OATH applet: 00a4040008a000000527210101 NFCConnection[0x04575e00].send(data:): NFCConnection.send(data:) – 13 bytes NFCConnectionManager[0x074d6e40].transmit(request:for:): Manager.transmit – 13 bytes to tag ISO7816Identifier(data: 7 bytes)
Here is the dreaded error: -[NFCTagReaderSession transceive:tagUpdate:error:]:897 Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement}
ERROR: Operation failed: Missing required entitlement DEBUG: Unexpected error: Missing required entitlement
Here is the info.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>NFCReaderUsageDescription</key> <string>The application needs access to NFC reading to communicate with your YubiKey.</string> <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key> <array> <string>A000000527471117</string> <string>A0000006472F0001</string> <string>A0000005272101</string> <string>A000000308</string> <string>A000000527200101</string> <string>A000000151000000</string> </array> <key>UISupportedExternalAccessoryProtocols</key> <array> <string>com.yubico.ylp</string> </array> </dict> </plist>
Here is the entitlements file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.nfc.readersession.formats</key> <array> <string>TAG</string> </array> <key>com.apple.security.smartcard</key> <true/> </dict> </plist>