Posts

Post not yet marked as solved
2 Replies
2.3k Views
In testing out the Core NFC API~ iPhone 7, IOS 13.1,13.2With the Sample-NFC-Application available at~ https://developer.apple.com/documentation/corenfc/building_an_nfc_tag-reader_appI've occasionally gotten an Error, as reported by the Delegate-Callback for when the Reader-Session has invalidated~ readerSession(_ session: NFCTagReaderSession, didInvalidateWithError error: Error)of NFCError Code=203 “Session is invalidated due to system resource is unavailable”Once this error has triggered, it will continue to occur anytime another NFC-Scan is attempted.The error will then also occur for any other App that tries to use the NFC API~ e.g. NXP-TagInfo https://apps.apple.com/ca/app/nfc-taginfo-by-nxp/id1246143596Effectively killing NFC App functionality on the IOS-Device..The only way to stop this is to Restart the IOS Device.Here is a Stack-Overflow Post on the issuehttps://stackoverflow.com/questions/48172963/how-to-avoid-nfcerror-code-203-session-is-invalidated-due-to-system-resource-isI'm assuming from the Post, and my own testing that attempting to start another NFC-Scan when one is already in progressis one of the main factors in causing the error to occur.My questions are;1. Are there any other actions that would cause the NFCError 203 to occur?2. Is there any way to fix the state of the NFC functionality of the IOS-Device once the NFCError 203 error has occurred, other than restarting the IOS-Device?
Posted Last updated
.
Post not yet marked as solved
1 Replies
899 Views
After having reviewed the information from the WWDC2019 Key Note on the NFC API~ https://developer.apple.com/videos/play/wwdc2019/715/I've been experimenting with the Sample NFC-Project as found at~ https://developer.apple.com/documentation/corenfc/building_an_nfc_tag-reader_appI've just been focusing on Read/Write of NDEF-Formatted-Tags,~ using NFCNDEFReaderSession, NFCNDEFReaderSessionDelegate, NFCNDEFTag, NFCNDEFMessage, and their related methods and propertiesand ISO7816-Native-Tags~ using NFCTagReaderSession, NFCTagReaderSessionDelegate, NFCTagI've had general success with API's for both technologies, but I would like to know if and how i can use theNFCTagCommandConfiguration class~ https://developer.apple.com/documentation/corenfc/nfctagcommandconfigurationwith those API's?I'm specifically interested in its maximumRetries and retryInterval properties.An example use case for me is with the Delegate-Callback for when the Reader-Session has invalidated~ tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: Error)Depending on what the Error was (exceptions and/or read/write issues specifically),I'll automatically restart a new NFCTagReaderSession after waiting a short interval.This has the effect of making the "NFC-Modal" displayed on the IOS-Device to bounce in and outa number of times before it finally succeeds without error.So I'm interested in whether I can somehow leverage NFCTagCommandConfiguration to more better handle automatic retries on Scan errors.
Posted Last updated
.