- Introduction
NFC Library for iOS uses Core NFC API. This Library is not available for other platforms.
2. Components in the Demo and what they do
The Demo contains a tab control with three tab items, named Read NDEF, Write NDEF, Read TAG. Each tab item contains Read or Write button, which in some cases calls the same onClick event and executes the same code. For example the Read NDEF and Write NDEF tab items both execute the same code in their buttons’ onClick events. You see the code bellow.
[crayon-66dd06bb84ce5605160973/]The TNDefSession and TNfcTagSession objects actually are part of the NFC Library that reads and writes when NFC items for scanning are near the phone. When the OnDetect event is called the NDefSession, the code in the NDefDetect method is executed. A cycle starts, going through all the available tags. You can see this in the code below.
[crayon-66dd06bb84ceb807895935/]When NFC is active, a line with text is added to the TMemo with text ‘Active event’.
[crayon-66dd06bb84ced530560824/]To get a better vision of how this library works, check the video with the Demo in Action below.
To get the Demo and test it, please download the library from the link below.
https://winsoft.sk/download/infclib.zip
With Firemonkey’s Native Ios App Builder, you can try the Core NFC API Library in the Delphi or C++ environments. Try the free tool here.