If I understand your use case correctly, with your Write function you are trying to have your app become an NDEF tag. In other words you are trying to emulate an NDEF tag. Unfortunately, this is not possible. As the name suggests a readerSession is just that. It can read NFC tags. I believe you may have misunderstood the use case for writing to an NDEF tag. While it is possible to use the writeNDEF(_:completionHandler:) to write to an NDEF tag, that is all this function can do - write a payload to an existing NDEF tag. This function does not turn your app into an NDEF tag. What you are trying to do is called Host Card Emulation, and this is only available for apps that fit specific requirements. You can read the rules and requirements at HCE-based contactless transactions for apps in the European Economic Area (EEA) and follow the steps in the documentation to apply if, and only if your conditions and use case matches the stated requirements. Argun Tekant / DTS Engineer / Core Technologies
Topic:
App & System Services
SubTopic:
General
Tags: