NFC should not open Safari on iPhones

Modified on Sun, 28 Jan 2024 at 08:13 PM

Overview

The URL Routine Trigger can be used in a convenient was together with NFC tags. When the NFC tag is scanned with a smartphone, the smartphone will open the URL of a previously created trigger, which will launch an Alexa routine.

An easy way to configure the NFC tag is to write the URL of the URL Routine Trigger directly to the NFC tag. This approach has two shortcomings:

  • If the NFC tag is publicly accessible this approach is insecure as anyone with physical access to the NFC tag could read the tag and launch the associated Alexa routine.
  • If the NFC tag is scanned with an iPhone, Safari will be opened on the iPhone and a page is displayed in Safari. In some situations, this may be undesired.

A solution is to use Apple’s “Shortcuts” app on an iPhone.

Step-by-step guide

In this guide, a new automation in the “Shortcuts” app will be configured with the “get contents from URL“ action. Moreover, the URL of the URL Routine Trigger will not be written to the NFC tag, but will only reside on the iPhone, which is more secure.
Please follow these steps to configure a new shortcut on an iPhone:
  1. Delete the URL from the NFC tag using the “NFC Tools” app (or any similar app) on your iPhone.
  2. Open Apple’s “Shortcuts” app.
  3. Create a new automation (not a shortcut).
  4. From the list of automation types, choose “NFC” and scan the NFC tag with your iPhone. It will only read the unique identifier of your NFC tag and will not require any URLs to be stored on the NFC tag.
  5. As action, use “Get contents from URL” and paste the complete link of you URL Routine Trigger. This action will call your URL Routine Trigger in the background and will not open the URL in Safari.
At the end of your automation, you could add a message that is displayed on your iPhone so that you know that the trigger was activated.

How it works

When you scan the NFC tag with your iPhone, the automation you created will be called in the background. The automation will call the URL Routine Trigger. Since the URL for your URL Routine Trigger only resides on your iPhone, it is more secure than putting the URL on the NFC tag.
Please note that you have to configure each smartphone that should be able to use the NFC tag.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article