How I Turned My Apple Watch Into The Habit Tracker With Shortcuts?

Category
💥Productivity
Date published
Apr 3, 2021
Last updated
Jul 31, 2021 3:53 PM
image

I wanted to have a physical habit tracker.

When I would make an action, I would use a tracker to keep a record of it. I would then check how many times I performed an activity at the end of the day.

I wanted to use my Apple Watch since it is an item that is always on my wrist and easy to reach.

To be more precise, I wanted to develop a thought tracker. The use case was as:

💭

When a specific thought crossed my mind — I would tap on my watch screen and add it to the log. In the end, I can see how many times per day I have a specific thought.

All right. Where shall I start?

As a true IT product manager, I first decided to make a list of requirements for this small project.

End product: App that is compatible with Apple Watch that could be used as a tracker.

Requirements:

  1. App can be added to the face of the Apple Watch
  2. App adds an entry to a database
  3. App can perform a function in one tap

Choice of tools

I was already familiar with Apple Shortcuts, which basically allow you to write custom scripts on your Apple devices without any code. They are also compatible with the Apple Watch. So that's the place where I decided to start.

I needed a Shortcut that would log my thought in some kind of a database.

First, I looked at the existing templates of Shortcuts to see if I can find something useful.

image

There was a shortcut called "Log Water." It lets you log your water consumption throughout the day—something similar to what we need but with water instead of thoughts.

💡

You can use the Shortcut integration with the Health app and the "Log Health Sample" function to create Shortcuts for adding entries about various health metrics to the database.

I decided to adapt the Log Water Shortcut to my needs. I did not need the list of choices. I needed a single option — "Log 1".

There was no type "Thought" as a category in Apple Health, so I decided to stay with water for now.

image
image

I ran a test, and it works as needed. The Shortcut adds entries of 1 ml to the Water database every time I trigger it.

Great!

Let's add it to the face of Apple Watch so it's reachable within one tap.

image
Success!

Let's tap it and see how it works.

image
Wait... what is this annoying pop up? Do I have to press it every time?

After some research, I found that Apple policies do not allow triggering Shortcuts without asking for manual permission first (with certain exceptions in Automations). This is done for privacy purposes.

So we cannot get rid of this annoying confirmation message while triggering Shortcuts through Apple Watch faces. We have to first go to the Shortcuts app on Apple Watch and then click it there.

image

That's not exactly what we want. It is an extra movement we have to make, and it does not satisfy our requirement #3 - one-tap experience.

What are the alternatives?

Hmmm.. let's think. Since we cannot achieve this through Shortcuts, can we do it through a different app?

What about Shortcut Automations?

In the Automations menu, there is an option to disable the "Ask Before Running" confirmation. So technically, we could try to use the same "Log" function within the Automation.

image

The downside of Automations is the choice of a trigger. It is somewhat limited.

It doesn't seem like it's possible to trigger an Automation using an Apple Watch.

...or is it?

My eyes landed on the "App" trigger. For example, if a specific app is opened, it can trigger a particular Shortcut without confirmation.

image

But it looks like this option only works with iPhone apps. You cannot trigger an Automation using an Apple Watch app.

🤔 What if we can use an Apple Watch to open an app on an iPhone?

image

And yes - it's possible. The default "Camera Remote" Apple Watch app has a function to open an iPhone's Camera app. Luckily, Camera Remote is also compatible with an Apple Watch face!

So we can make a Shortcut Automation that will "log a thought" every time the Camera app is opened.

Then, we can use Camera Remote app on our Apple Watch to trigger the Shortcut. And all with a single tap.

Let's try this!

Write the Shortcuts Automation script.

image
image

Add Camera Remote to the face of the Apple Watch.

image

Press on Camera Remote icon.

image

And voila — the records are added without any confirmation 🎉.

image
image

The one obvious downside is that log records might be added unintentionally if I purposely open the Camera app on my iPhone. But since I don't use my camera that often — I can accept such a setback 🙂.

UPD: you also have to press the digital crown to close the Camera Remote app. But it is much easier to press the digital crown right after tapping on Camera Remote. Otherwise, with a regular Shortcut, you have to press the Shortcut and wait until the Shortcuts app is loaded just to see the confirmation popup appear.