Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Powerful Core NFC API Library For Delphi FireMonkey On iOS By Winsoft

time lapse photography of cars on road during night time

Photo by Kehn Hermano on Pexels.com

  1. 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-6768b55c75547620648923/]

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-6768b55c7554d634977865/]

When NFC is active, a line with text is added to the TMemo with text ‘Active event’.

[crayon-6768b55c7554f378596701/]

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.

Exit mobile version