CoreNFC: Sending Custom Commands using NFCISO15693Tag protocol

I'm trying to use iOS 13's new CoreNFC capabilities to read\write data to an ISO15693 compatible chip. My app includes the NFC Tag Reader Session Formats Entitlements:


<key>com.apple.developer.nfc.readersession.formats</key>
<array>
  <string>NDEF</string>
  <string>TAG</string>
</array>


The NFCTagReaderSessionDelegate receives an object that conforms the NFCISO15693Tag protocol and I have been successfully called readSingleBlock function to read dtat from the Tag. But whenever I call customCommand to send a proprietary command for reading data from the Tag, I get the following error: "Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement}".


Does anyone has managed to get this work? What are the missing entitlements needed to use customCommand function?

Accepted Reply

Ok, so for me iOS 13 beta 4 has solved the issue with the"Missing required entitlement".

Now, I can call the customCommand method without any error...

Replies

Same issue found with iso15693...no idea how to solve it !!

customCommands does not work..😢


Standard commands as defined in 15693-3 standard work fine.


In addition, many extended commands are missing : As defined into the 15693-4 standard, the following extended commands are not supported into coreNFC iOS13 beta (Is this an oversight?) :


'34' Optional Yes Yes Yes Extended write multiple blocks

'35' Optional No No Authenticate

'36' Optional Yes Yes KeyUpdate

'37' Optional No No AuthComm crypto format indicator

'38' Optional No No SecureComm crypto format indicator

'39' Optional No No Challenge

'3A' Optional No Yes No ReadBuffer

'3B' Optional No No No Extended get system information

'3C' Optional No No No Extended get multiple block security

I'm having the exact same issue. Standard ISO15693 operations, such as read multiple blocks, is working but customCommandWithRequestFlags fails with "Missing required entitlements". Based on the WWDC session, I would expect this to work. I think this should be reported as a bug.

Thx for confirmation...

I logged a "feedback assistant" ticket 1 week ago...but no answer yet !!!

I did the same, reported a feedback and got nothing at all... Have you had any response yet, or have you been met with a wall of slience? Really annoying as it's public API with no warning of it in either the docs or the WWDC session video - perhaps it may change in beta 3 - here's hoping

Just checked the beta 3: same error message!

It is indeed very frustrating... NFC has long been held back by Apple not supporting it, but now with iOS 13 and the latest announcements we are eager to see this up and running.

I have also reported this error to the feedback center and I am waiting for a response.

Thanks for checking so quickly Behnaz, it was on my list of things to do this evening as I've not got to downloading Xcode beta 3. Hopefully Apple respond to one of us soon...

no feedback yet !!! :-(

I reported this problem using the 'Feedback Assistant' .


The report status has just changed to :

Resolution:Potential fix identified - For a future OS update


I hope that this is going to be in the coming beta update ...

Great to hear! Thanks for the update, will keep an eye on the next release notes - guessing the next beta will come out next week....

I use the iOS 13 beta3 got the same error.
Hope apple fix it before iOS13 release

I have tried iOS 13 beta4 .

Got the same error.


-[NFCTagReaderSession transceive:tagUpdate:error:]:708 Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement}

Ok, so for me iOS 13 beta 4 has solved the issue with the"Missing required entitlement".

Now, I can call the customCommand method without any error...

Hi Behnaz,

What did you do to get this to work? I'm on beta 5 and just tried this out, still seem to be getting the same thing... could you share what command you used? Have you tried in the latest beta to ensure the functionality hasn't changed?

Hi d.Knowles,


Yes I do have the latest (beta 5 build 17A5547d), and XCode 11.0 beta 3.


When do you get the error ? At the start of the session or when you actually call the customcommand function?


If you are getting the error before the end of tag connection, you should check again your App profile, capabilities, .plist and .entitlements file and that you ar embedding the corenfc.framework library ... ( see Core NFC Enhancements - WWDC 2019 - Videos - Apple Developer )


If the connection goes well but you still get the error on customcommand, the problem should be solved with installing beta 4 or later and I did actually get the confirmation from the 'Feedback Assitant'.


I just needed the customcommand function as I am using the NFCISO15693Tag to communicate with and ST25DV Tag. I have not tested the other functions.

Thanks for the reply.

It happens as soon as I call customCommand. I don't have an issue getting a reader session set up, or reading data from the tag using:


getSystemInfo(requestFlags:completionHandler:)

readMultipleBlocks(requestFlags:blockRange:completionHandler:)

writeAFI(requestFlags:afi:completionHandler:)

and a few others.


It's as soon as I hit this method:

customCommand(requestFlags:customCommandCode:customRequestParameters:completionHandler:)


Would you mind sharing the commands you're using? I've tried A1 -> A5 and get the missing entitlements error.


I've double checked my entitlements and have both TAG and NDEF for the com.apple.developer.nfc.reader entitlement.. Using beta 5 of both iOS and Xcode on an iPhone 8.