iOS Question NFC Tag Reader and Writer Library

walterf25

Expert
Licensed User
Longtime User
Hi All, i know there probably aren't too many B4i developers that know how to wrap iOS libraries, but I was wondering if those who can, if they would be able to help me out.

I have been working on wrapping parts of the new NFC framework introduced in the newest iOS 13 version, I know Erel wrote an NFC library, but I believe his library can only Read NDEF data from NFC tags, So far everything seems to be going well, except for the function that reads regular data from a mifare tag, i've followed Apple's documentation but i keep getting the following error when i run the an app using this library.
ios NFC Error Code=202 "Session invalidated unexpectedly" UserInfo={NSLocalizedDescription=Session invalidated unexpectedly

I have added the following to the app,
B4X:
#PlistExtra: <key>NFCReaderUsageDescription</key><array><string>Reading NFC tags.</string></array>
#PlistExtra: <key>Privacy</key><array><string>We will not share your information.</string></array>
#Entitlement: <key>com.apple.developer.nfc.readersession.formats</key><array><string>TAG</String></array>
The above according to their documentation is required to get this working, the first line gives a description of how you are using this app, the second one i'm not too sure about, but it says in their documents that it is required, and the third one is also required as it tells the os what type of data the app is allowed to read, in this case we need TAG to read normal un-encrypted data.

Does anyone have any idea on what I could be doing wrong, the code works as i am able to compile the xcode static library and place it in the libraries folder of my local mac server, I am also able to read NDEF records using a separate function on the same library.

Any ideas, anyone?

Walter
 
Top