How to make your own Shortcuts on iPhone - This one will show your photos from this day on every year

How to program your own shortcuts on iPhone and iPad.

Shortcuts is Apple's new version of Workflow that launched with iOS 12. It is a productivity tool that does what its name implies - each shortcut is basically a program or 'workflow' that runs through a set of steps to produce a desired result. For example, Home ETA is a navigation shortcut that uses Maps and Messages to send someone (pre-determined by you) your arrival time with a single tap. There are hundreds of pre-made shortcuts in the app's gallery, but one of the best features of Shortcuts is that you can edit existing ones to fit your needs or you can write your own. In fact, many people write their own shortcuts and eagerly share them on third party sites like Reddit, Sharecuts and MacStories.

To give you an idea of how to write your own shortcut, the following example will go through each step of creating a shortcut that will take the current date and then display photos from your albums taken on that date in previous years. Here's how to write your own shortcut on iPhone or iPad:

TL;DR If you are viewing this on your iPhone, you can download the shortcut here if you aren't interested in the programming.

  1. Open your Shortcuts app and select Create Shortcut from the Library section.
  2. How to program your own shortcuts on iPhone and iPad.
  3. Shortcuts has a library of procedures or "actions" that you will use whenever you write a shortcut. The first thing we want to do is get the current date, so tap on the search bar, search for "date" and tap on the Date action when it pops up.
  4. How to program your own shortcuts on iPhone and iPad.
    How to program your own shortcuts on iPhone and iPad.
  5. Now you see that we have Date as the first action in our program. It is set to get the current date by default which is what we want so we can leave it alone.
  6. How to program your own shortcuts on iPhone and iPad.
  7. Now we want to store the date in a variable (programming term for a data element that is likely to change) that we can manipulate. Search for "variable" and select the Set Variable action. Tap on "Variable Name" to enter your own name, we'll call it Date.
  8. How to program your own shortcuts on iPhone and iPad.
  9. Now search for and add the "Repeat" action. We need this because we want to change the date and search for photos with each new date. Tap the "+" button to repeat 12 times (I chose 12 simply because it covers all of the years since the first iPhone, thus will include my oldest photos taken with an iPhone).
  10. How to program your own shortcuts on iPhone and iPad.
  11. Now we want to add some actions to the body of the Repeat loop. Search for and add the "Find Photos" action. Once you have added it, tap on "Add Filter."
  12. How to write your own shortcuts on iPhone and iPad.
  13. Tap on "Album" and change it to "Date Taken."
  14. How to write your own shortcuts on iPhone and iPad.
    How to write your own shortcuts on iPhone and iPad.
  15. Now tap on the date and tap on "Variables." Select the Date variable that we created (not the one with the little calendar icon next to it).
  16. How to write your own shortcuts on iPhone and iPad.
    How to make your own shortcuts on iPhone and iPad.
  17. You probably want the photos sorted, so tap on None and change it to "Creation Date." Now you can select an order - "Latest First," or "Oldest First."
  18. How to make your own shortcuts on iPhone and iPad.
  19. You will notice the "Find Photos" action is outside of the Repeat loop, so long press on "Find Photos Where" until you have grabbed it, then drag it to above "End Repeat." Let it go to place it.
  20. How to make your own shortcuts on iPhone and iPad.
  21. Now we want to store the results of this action in a new variable, so search for and select "Add to Variable" and name it "Photos." Drag this into the Repeat loop and place it underneath Find Photos.
  22. How to make your own shortcuts on iPhone and iPad.
  23. Now we want to subtract a year from our date and repeat the loop. Search for and add the "Get Variable" action.
  24. How to make your own shortcuts on iPhone and iPad.
  25. Tap on Choose Variable and select our Date variable, then drag the action into the loop and place it under Add to Variable.
  26. How to make your own shortcuts on iPhone and iPad.
  27. To manipulate the Date variable, search for and select "Adjust Date."
  28. How to make your own shortcuts on iPhone and iPad.
  29. Change "Add 0 Seconds" to "Subtract 1 Years" by tapping on the individual components. Drag and place it under Get Variable when you are finished.
  30. How to make your own shortcuts on iPhone and iPad.
  31. After the adjustment we want to store it as the Date variable again (this isn't automatic as the programmers among you might expect), so search for and select "Set Variable" and type in "Date" as the name. Drag it into the loop underneath the Adjust Date action.
  32. How to make your own shortcuts on iPhone and iPad.
  33. That completes the loop - it will find all of the desired photos and store them in the Photos variable. Now we just need to display it. Search for and select "Get Variable" and select the Photos variable.
  34. How to make your own shortcuts on iPhone and iPad.
  35. Now search for and select Quick Look. With that the shortcut is complete - tap on the Play button to see if it works. You can give your shortcut a name, icon and more by tapping on the button that looks like toggles in the top right.
  36. How to make your own shortcuts on iPhone and iPad.
    How to make your own shortcuts on iPhone and iPad.

Your Shortcut is now available in your Shortcuts Library. You can add it as an icon on your Home screen by following these instructions.

Unfortunately, while this shortcut will show you all of your photos from previous years, you can't see what year the photos are from. There is a somewhat clunky workaround for this - you can add a Get Variable action to get the Date variable followed by an Add to Variable that adds it to the Photos variable. Put this as the first two actions within the Repeat loop, above the Find Photos action. With this in place you will see a white page with the date in small text, followed by photos from that date. You will see this even if there aren't any photos from that year, so you may see many in a row without any photos. It works fine but isn't aesthetically pleasing.