Since iOS 11, apps can read NFC tags on iPhone 7 or newer. This has been a long awaited feature that should lead to a more widespread use of NFC tags. Unlike on Android, you still need to use an app to read NFC tags. Luckily, adding NFC reading capabilities to apps on iOS is not difficult. This page should serve as a tutorial on how to do add these native capabilities, and then leverage the EVRYTHNG Platform to create interactive experiences with NFC tagged products.
For this tutorial we will create a small sample app iOS 11 application that opens URIs found in any NFC tags, called EVRYTHNG NFC Reader. To read data from an NFC tag, install and open the app, then touch the NFC icon. The app will then try to read a URI from an NFC tag and then will open it with another app on your iPhone. For example, if the NFC tag contains an
https:// URL, it will use Safari to open it. However, URIs can also reference other iOS applications. For instance,
facetime:// references the Facetime app.
In the example scenario shown above, the app scans the NFC tag on a whiskey bottle label. The NFC tag contains the address of a Web app, which is launched in Safari. You’ll notice that the URL obtained from the NFC tag in step 3 is not the same as the URL of the web app shown in the address bar in step 4. This is because the bottle is a Thng in the EVRYTHNG cloud.
A Thng has a unique identifier and is a dynamic data object. This is our concept of an “Active Digital Identity” (ADI), which introduces the notion of stateful, context-aware URIs. The EVRYTHNG Platform was created to provide the technologies that make it easy to host and manage ADIs. A very powerful and easy to use tool for ADIs is the Redirector, which is essentially context-aware URI redirection.
This is how the workflow depicted above was directed in the cloud, although from the user’s perspective, it was mainly a native app experience. To learn how to build the redirection part of the experience, read our tutorial Using iOS 11 QR Capabilities. All you need to do is to specify the
tn.gg URL (below the QR code) of a Thng onto an NFC tag, and the redirection will take care of the rest when it is scanned. Unfortunately, iOS 11 only supports reading NFC tags (not writing them), so you might need an Android phone if you want to create your own NFC tags.
Updated almost 5 years ago