I just bought my first NFC tags, which are in the shape of a circular sticker less than an inch in diameter. (They cost about $0.50 each when I bought a pack of 50.) I've successfully used them to trigger a macro on my Mac when I move my iPhone near the tag. It's amazing and exciting. I can hardly wait to see the kinds of things I will be able to do with this. This is a three-clap accomplishment.
Here's how I did it. These are detailed instructions so that most people can copy my method.
Part 1 - Setting up the Shortcut to trigger from the NFC tag
Step 1. Launch Shortcuts in iOS on the device you want to use to trigger the KM macro on your Mac.
Step 2. Open the Automation Tab on Shortcuts.
Step 3. Click on "+" near the upper right corner of your screen.
Step 4. Click on "Create Personal Automation" (because you want this automation to run on your iOS device.)
Step 5. Scroll down to the item that says "NFC" then click on it.
Step 6. Click on SCAN.
Step 7. Move the top of the iPhone within one inch of the tag, until it recognizes the tag.
Step 8. Enter a name for the tag. You may want to name the tag with a word that describes its function. Then click OK. Then click Next.
Step 9. Create your action (see below for an example.) Click Done when done.
Step 10. Click Next.
Step 11. I recommend unselecting the "Ask Before Running" switch on this screen. (If prompted, press Don't Ask.)
Step 12. Click Done.
Step 13. Now test this macro by moving the top of your iPhone to the tag.
For step #9 above, I recommend you first try the simple Example #1 below before trying Example #2.
Example #1 - Triggering a simple (non-KM) shortcut on iOS
Here's an example action for step 9, above: (this one does NOT trigger KM, it's here for demo purposes for beginners)
Step 1. Click on Add Action.
Step 2. Enter the word Weather in the search box. Click on the Get Current Weather icon.
Step 3. Some suggested actions will be listed. Click on "Get Details of Weather Conditions." (If it doesn't appear, search for it.)
Step 4. We want to change the field from "Date" to "Temperature". Click on "Date" to make the change.
Step 5. Click on the suggested action "Text" to add this action. (If it doesn't appear, search for it.)
Step 6. In the text box, type the letters: "Temperature is " then click on the variable labelled "Temperature" in the window below this action. Then click Done.
Step 7. (If needed, close the Weather popup, then) search for the Speak action by entering Speak in the search box.
Step 8. Click on the Speak Text action. You should now have four actions in your list. Return to the first list above.
Example 2 - Triggering a KM macro on your Mac from your iOS device
Step 1. On your iOS device, enter "URL" in the Shortcut search box.
Step 2. Select the OPEN URL action.
Step 3. In the URL action, click on the address box (which by default may say "apple.com")
Step 4. On your Mac now, start the KM Editor, and display your macro that you want to trigger. (For test purposes, try making a macro in KM that speaks the current time, or at least speaks "Hello".)
Step 5. On your Mac, click on "New Trigger" and select "Remote Trigger"
Step 6. On your Mac, click the COPY button that appears near the remote trigger string.
Step 7. Back on you iOS device, your cursor should already be flashing in the URL box. Click in the empty box, then click Paste. The URL address FROM YOUR MAC should appear in the box. If not, try again in a few seconds, because clipboards need to synchronize across iCloud, I think.
WARNINGS
- Triggering this macro can sometimes be quick (<1 sec) but can sometimes take a long time (>10 sec). This is probably due to Internet latency. Be patient the first few times.
- This macro will leave the "empty" KM trigger website page open in your browser. I can't figured out how to close that yet. I may add that to these instructions when I figure that out.
- For iPhones v7 and v8, you may need to download a free app to read the NFC tag. So this works best with iPhones v10, v11, v12 and v13.
- This technique does not require that you have unlocked your phone, but it may require that your phone is not in sleep mode. Normally when you pick up your phone the screen comes on since you touch the screen, so this shouldn't be a problem.
- This process assumes (for one point in the second example) that you are logged into the same iCloud account on both your Mac and your iOS device. It should still work if they are not synchronized like this, but you will have more difficulty copying the URL from your Mac to your iOS device. I'm going to assume your Mac and iOS devices are synchronized with the same iCloud account, since most people should have this.
- I am not yet sure if Apple Watch supports background NFC tag reading. People were asking for this a year ago, but after a minute of googling I haven't seen evidence that Apple has implemented it yet. But I'm not sure.
- NFC tags come with small amounts of memory (dozens to hundreds of bytes, I think). For this purpose I don't think memory matters because the only thing we need to store in the tag is its name.
IDEAS for possible use for NFC tags
NON-KM ideas for NFC tags: (although you may be able to enhance these ideas with a KM macro)
- Make a phone call to someone specific
- Read the weather forecast aloud
- Send a text message to someone that you have arrived home
- Set your smart lights to a dim red colour, and play your favorite song
- Read out all your calendar events for today
- Open your shopping list in Reminders
- Launch a FaceTime call with someone
- Announce verbally how close you are to achieving your fitness goals for today (eg, walking)
- Read your current street address aloud (this might be useful when you are in your car looking for an address)
KM ideas for NFC tags:
(not as many as I thought I'd have, but you can help with more ideas, and I may add some of them to this list)
- Launch a KM macro that shuts down (or puts to sleep?) your Mac
- Launch a KM macro that logs the date and time when you took your daily medication (assuming you use the Tag to mark when you take your medication. I think I'm going to use this.)
- Launch a KM macro that starts a Mac backup
- Launch a KM macro that collects some system information or health checks (eg, uptime, program status/completion) back to your iOS device via an iMessage
If you spot any errors in my instructions above, let me know and I'll correct them.