Automating NASA Wallpapers with Shortcuts and SpaceWall
Get help and suggestions for your iOS shortcuts and productivity apps.
Shortcuts Essentials
For this week’s special issue of MacStories Weekly to celebrate Week 2 of Automation April, I dusted off an old shortcut of mine and updated it for the modern era of Shortcuts automations and the ability to set wallpapers on your devices. The shortcut is called SpaceWall, and it lets you wake up each day to a beautiful space wallpaper automatically set on your iPhone, iPad, or Mac.
SpaceWall takes advantage of NASA’s Astronomy Picture of the Day (APOD), a website provided by NASA and Michigan Technological University that, since 1995 (!) has offered an incredible collection of space photography for everyone to see and use. Besides the idea itself, what I love about the APOD service is the fact that there’s a free API we can use to get HD images for specific dates in the past. I first discovered this back in the days of iOS 13, when I put together an initial version of this shortcut. However, that version could not set images as wallpapers since Apple mysteriously removed the ‘Set Wallpaper’ action during the iOS 13 beta cycle. Not only is ‘Set Wallpaper’ back now, but personal automations have been updated to support interaction- and alert-free execution, meaning that a shortcut like SpaceWall can now run on its own, on a schedule, without you having to do anything else.
To get started with SpaceWall, you first need to obtain a free NASA API key for personal use. It’s very simple: all you need to do is go to this website, enter your name and email address, and copy the API key. Download the shortcut at the end of this story and, when asked at setup, paste your NASA API key. That’s it. You’re now ready to start using SpaceWall.
The best way to experience SpaceWall is to set it up as a personal automation that runs on a schedule. To ensure SpaceWall can always run reliably without errors, I designed it so it fetches the previous day’s photo; this way, you can create a personal automation that runs every morning and rest assured SpaceWall will find the image for the previous day on NASA’s servers.
In iOS 15.4, you can even disable automation alerts, so SpaceWall will be able to run automatically without any other interaction required on your end.
By default, SpaceWall saves all images and their official descriptions as JPEG and Markdown files inside iCloud Drive/Shortcuts/SpaceWall in the /Images and /Logs sub-folders, respectively. To help you get even more out of SpaceWall after it has run for a few days, I also created SpaceWall Utilities, a related shortcut that lets you view previously saved photos, read descriptions, and more.
With SpaceWall Utilities, you’ll be able to pick a random photo from your collection of previously saved images and set it as the wallpaper; you can pick a specific photo or view the previous day’s photo again; if you want to learn more about the new wallpaper you just woke up to, you can choose ‘Read Description for Last Photo’ and learn more about it directly from NASA.
The latest advancements in Shortcuts have made it possible for SpaceWall to be the shortcut I wanted to release three years ago. I love NASA’s APOD initiative, and even though I may not like the look of every single image when used as a wallpaper, I think it’s incredibly neat that I can now let Shortcuts build a personal archive of these photos with an automation.
If you also love space and the idea of Shortcuts presenting you with a cool space photo every morning, you can download my SpaceWall shortcuts below.