‘Spring cleaning’ usually evokes images of boring homework, but it’s worth tidying up your smartphone and tablet as well – and I do not mean it physically, but it can also be a good idea. If you’re like us, your devices are full of old photos, files, and applications that take up valuable storage space. It’s just as good now to start cleaning anything. And if you’re an iPhone or iPad user, Apple’s shortcut feature might help.
What are shortcuts?
In a nutshell, with Shortcuts you can quickly perform a specific task or a more complex series of tasks with a single tap or voice command. This idea is not unique to Apple – if you’re a geek of a certain age, you probably know it as strings of action better than ‘macros’.
Building your first shortcut may seem daunting at first, but relax: you do not have to be a coder to create a truly useful setup. All it really needs is some time to put all the pieces together. More than anything, I saw these things as a bit of a logical mystery. You know the result you are looking for – it’s just a matter of thinking through the steps and finding the right sequence of actions to get you there.
Of course, there are limits to what Apple will allow you to do. Suppose you are like me, and you just have to remember to delete your notifications regularly. I would like to create a keyboard shortcut that will automatically dismiss notifications generated more than a day or two ago, but Apple does not make information about the age of a notification available to Shortcuts. Similarly, it does not appear to be a way – at least for now – to find out the last time you used certain programs, so there is no way to build a shortcut that highlights programs that you can remove without not to miss it. As you’ll see later, Apple also has a fairly limited set of tools for communicating with files stored directly on your iOS device.
Granted, there are a handful of third-party apps, such as Toolbox Pro, Data Jar, and JellyCuts, that expand dramatically on the shortcut tools shipped in iOS, but the thing to remember is that there are some tasks you can’t pull off with shortcuts still.
Oh, and for the sake of your common sense, it’s best to put shortcuts on a big screen if possible. Since there is no shortcut functionality available on Apple’s Macs – even the new ones that use the iPhone-inspired M1 chipset – this means you should use an iPad if you have one. Don’t worry: As long as your iPad and iPhone are signed in to the same Apple ID, any shortcut you create on one will be visible in the other.
How to create a shortcut
Compiling complex actions to clean our devices initially involves a lot of trial and error, so let’s work through a basic example. Meet BackupNotes: this is the first half decent shortcut I ever made, and as the name suggests, it is meant to help you quickly store your old notes in the cloud before you go through and clean house.
The logic here is pretty simple. First, we check today’s date and call it back 30 days to make sure it’s relatively new and essential in the net. And right away you have a few different ways to pick it up. Initially, I actually made a separate shortcut called “MonthAgo” that takes the current date and subtracts 30 days from it. From there, I can add an instruction to the BackNotes workflow to run the MonthAgo shortcut first, and then pass the custom date into the Find Notes action. It turns out that the whole rigmarol was actually not necessary. After a bit of Google I was able to just define the date and adjust directly within this shortcut. This new approach is much cleaner, but I’m still grateful to have taken the long road first, as it opened my eyes to the possibility of connecting multiple shortcuts to each other.
It’s pretty smooth from there. If you are looking for actions related to the Notes app in the Quick Bar sidebar, a handful of options are discovered, including the one we need to select notes that are older than the date we defined earlier . Then just add an action to compress the notes into a single ZIP file – you can not see it in the image above, but there is also a text field to name the new compressed file – and finish things off with a save action.
I have to note that although the last few steps sound like the easiest, it took a little more time to figure out than I want to admit. Originally I wanted my iOS devices to open the sub-page so you could more easily access the new ZIP file from contacts, or in the cloud storage application of your choice. You can do it, but there is a caveat. If you use a shortcut to name a file and send it via the subpage, the name does not stick; it ends with the common name that Gmail or Telegram or Google Drive decides to give it.
Obviously, the flexibility of the Shortcuts apps means that you can have a fairly easy solution if you have a game. It only takes a few extra steps right at the end. For example, you can close things with an action to send the same file via the sub-page, plus another to delete it after you move it where you want it. It’s functional when executed, but it should be one last tap to confirm that you want to delete the ZIP file, which feels a bit inelegant. Fortunately, the solution I end up with is good for my purposes. By saving the backup of the notes through iCloud Drive, you can manually select a third-party storage service (Google Drive, in my case) that you have already linked to the iOS Files app.
Adjust the formula
Now that your notes have been safely stored elsewhere, you can now scrub through them all and delete them as needed. But what can we do if we turn to the basic formula? Well, about this: let’s back up other files you’ve saved on your iOS device before going on a cleanup trip.
As you can see, the last two steps here are the same as in the previous example, but the introduction is a little different. Because I want to choose the file name of the backup, rather than marking it with the date as before, things start with the “Ask for text” action. The user then enters the filename he wants, which is saved as a variable in the next step. (Pro tip: once you find actions you suspect you will use regularly, you can save them as favorites for easy access.)
With the beginning and end sorted, it goes to the files we need. It’s easier than it sounds. Instead of using the “Find Notes” action from the previous time, you should use “Get File” to examine the file structure of your iOS device. Once the action is set, it is important to make sure that the options for displaying the document selector and selecting multiple files are checked. Once you really perform the keyboard shortcut, you can navigate through the folders on your device and select the ones you want to pack and download in the last two actions. You can again save the new compressed file in almost any cloud storage service associated with your Files app. (I say ‘almost’ because Dropbox can be added to your Files app, but you can not navigate there when it’s time to save the file. If you live in Dropbox, you need another, equally simple operation use to store your backup in it.)
Just as useful as this shortcut can be, Apple’s limitations mean it’s not as automated as you would prefer. I know of no way to use the “Get File” action to collect all files in a specific folder, such as the file on which your Safari file download is stored. Being able to automatically select, merge and save those files somewhere would be very useful, but the app just does not provide such fine detail.
Add more actions
I do not know about you, but the screenshot album on my phone is a disaster – it’s fleetingly funny tweets, photos of my home screen that I accidentally captured and a screenshot of this beautiful nightmare. If your storage on your iOS device starts to run low, it can help clean up, so let’s take a step back to a shortcut that automatically removes some of the old images.
Right off the bat there are two new actions to dig into. The first does exactly what is on the tin – feed it with a piece of text and the shortcut reads it aloud. (Of course, this is not necessary, but what is life if you can not scratch around a bit?) The second is meanwhile one that you will probably return to regularly. It gives you the ability to define and display multiple options in a notification that slides down from the top of the screen. In this case, we want to be able to remove screenshots that we consider old, or remove all screenshots at once. It also introduces us to the idea of performing multiple tasks in one shortcut. It will definitely come in handy if you continue to build your own.
Granted, these are pretty simple tasks – one of which is doing the now very well known date customization trick and using the Find Photos action to select all the screenshots taken more than a month ago. (You can customize it quite easily if you prefer to select screenshots, for example last changed before a specific date.) Once that action applies the criteria to find the correct images, you need to add a Delete Photos action to get rid of it. By default, you are asked to confirm that you want to delete the files, so there is always a chance to return if you think better of it.
Regarding the following task: delete all screenshots instead of selecting them? It’s easy: just recreate the previous task, but without specifying how old the screenshots should be. As with the other examples we worked through, there is plenty of room for experimentation and customization, depending on exactly how you want things to work, but for now, we have a simple tool for saving some of your old, unnecessary files.
What next?
So, we’ve created some useful shortcuts – what now? Well, you should probably give it a try. All the shortcuts you create are accessible within the app, but there are situations where you need faster access to them. In those cases, you can place the appropriate shortcuts on your home screen, and as usual, there are a few ways to do this.
The simplest way to go is by adding a shortcut widget. Long press on an app on an iPhone and tap on the plus sign that appears in the upper left corner. From there, you can choose exactly the widget layout that feels right and pick it in all your apps. If it’s a little too big for your liking, you can also create app icons on your home screen to run your keyboard shortcut directly:
Engadget
Alternatively, you can always use Siri – it can recognize all your shortcuts by name and execute it (almost) in the same way as if you had just pasted it on your screen. The only real difference is that if you need one of your shortcuts text input, like the directions we made above, you should respond aloud rather than punching text manually.
This is just an accident course for the creation of shortcuts. If you are interested in learning more about manufacturing these smart tools, there is no shortage of places to turn. I mostly relied on the excellent r / Shortcuts subreddit and Chris Lawley’s YouTube channel to get an idea of what was and what wasn’t early. But the best way to figure out how to make better shortcuts is to pull some apart.
Go to the settings of your iOS device and allow ‘unreliable’ shortcuts. It allows you to install shortcuts created by other people, and to see how their logic unfolds can be very informative. Just make sure you take a few moments to check out how the third-party shortcuts work before using them!