Have you ever taken the long way home? This is one of those journeys. It was a fun journey. But an unnecessarily long one.
This shortcut solves a simple problem - a lazy personโs desire to do less. In the creation of that solution, I spent more time that I will ever spend using the shortcut.
But maybe I can save YOU some time.
This Apple Shortcut opens the App Store to the Ice Cubes Mastodon App detail page where you can click the Update button. It works from any Apple device.
Itโs such an exciting time in the Fediverse. All kinds of new developments and new innovations especially when it comes to Mastodon apps.
One of my (many) favorite Mastodon apps right now is Ice Cubes: for Mastodon by Thomas Ricouard.
I started following his journey with building the app late last year and was lucky enough to get a seat in the Test Flight beta. His excitement while building the app was apparent from the get go and it was fun to cheer him on and provide contributions in what little ways I could.
The Issue
The builds and MUST TRY features were being implemented and published constantly - multiple times a day sometimes. Test Flight made it easy to keep the app up to date as needed. And after being released to the App Store, it didnโt slow down that much! Updates get announced immediately, and it may take an hour or two for the App Store to start pushing out the updates to everyone. If you want the update NOW, youโve got to force the update by visiting the App Store detail page.
- Open the App Store
- Search for โIce Cubesโ
- Click through for Detail
- Click the Update button
How can my lazy self make this process easier?
The Solution
Apple Shortcuts. Iโve seen them sitting there in my app list, but never bothered with them. This sounded like a perfect way to deal with repetitive actions like this.
I made this more difficult than it needed to be.
After poking around with the available options, I came up with this plan:
- Connect to the App Store App
- Search for the App by Program ID
- Find the App Url in the Details
- Open the App Url in Safari
- This pushes you through to the App Store directly
- Wallah! If thereโs an update, you can click the button.
So I went from 4 steps to 2:
- Click the Shortcut
- Click the Update button (if needed)
I really wanted to also have it click the Update button if it existed, but my brain says not tonight.
Regionally Challenged
This worked well, except for one thing. I noticed that the App Store Search required both a Product Id and a Region. So if I live in the United Kingdomโฆis this going to default to United States for those individuals? Thatโs not good. Iโm pretty sure each region has different App Store views (or the product is completely not available in some regions perhaps).
Ah but there was a solution - Location Services! Just ask to allow use of Location Services, it grabs the current region, and then you can pull that into the Search. It worked! On my phone and iPad.
Butโฆit felt creepy to ask for location services just to open a link. And, on my Mac, it just refused to work even when I enabled location services.
So what are my other options?
Ask for user input
Clicking around a bit more, you can configure setup questions that run the first (or every) time the shortcut is utilized. So, I could ask ONCE for them to select their region, itโs set, and they never have to bother with it again. The input even grabs the available regions and adds them to a list for selection. And, it SEEMS to default to the userโs selected region (I canโt be sure).
This solved my problem and I was pretty happy with it! On all my devices (iPhone, iPad, and Mac), the steps worked and I ended up on the App Store detail page.
But I still wasnโt happy with the Mac behavior. It did open the page in the default browser (chrome) but unlike on my phone and tablet, it displayed a cautionary prompt asking if I wanted to open the link in the App Store. How can I remove that step? I see that I can set Chrome to always allow it, but I really donโt want to always flip over to the app store from these pages - just in this one instance.
Scooby-Dooing the Mysteries
So what type of request is being sent through the browser based app detail page that forces the redirect over to the App Store app? I nosed around and found that the links that were being sent to the browser were in this format:
1
itms-apps://appstore.apple.com/app/id6444915884
These are called URL Schemes and allow you to open specific apps based on the initial scheme - where โhttps://โ normally appears in the URL, you change it, which tells the browser โopen this in the App Store when the scheme is itms-apps://โ or โopen this in the Mammoth app when the scheme is mammoth://โ. Cool! This has to be built into the app, then the browser or OS(?) keeps track of which app has which URL scheme. Iโm curious how apps donโt accidentally utilize the same URL scheme - is there a registry list? Save that inquiry for later. Focus!
Even better, I noticed that by using these URL schemes, there were no indicators in the URL about the specific region. All that magic happens after the app opens up and it makes those decisions.
Simplicity Wins
So - my shortcut is now down to a one-liner ๐
Just open a URL:
1
itms-apps://appstore.apple.com/app/id6444915884
And Iโm exactly where I want to be.
All my deductions about regions, the search for the app in the App Store - all unnecessary!
Oh well, it was fun trying it out and seeing how it worked. But in the end, simplicity and reliability win out, and thatโs the case with this solution.
Having fun with it
The final steps were choosing an icon color and image, then naming it. I may have spent more time messing with this than actually building the shortcut.
Iโve included all three versions here if you want to try them or view the steps:
- Simple - Ice Refills
- The Long Way Home - Location Services Required
- Asking First - Region Lookup and Selection
This could easily be updated to work with any app and with some extra features:
- Prompt the user for the app name, show the list, store the value
- Figure out a way to check if the Update button exists and push it automatically
Maybe youโll find it helpful, maybe not. Maybe youโll just create a shortcut in your browser with the URL scheme link I provided above, if youโre sane and boring.
Whatever klinks your glass.
Comments
Total Interactions: 58Likes
Posts, Re-Posts and Bookmarks
Replies
Donโt be afraid to build stupid things.
#TIL about Apple Shortcuts and it sparked future ideas for personal and perhaps shared shortcuts moving forward.
If youโre interested in my ridiculously extended journey to creating what amounts to a link element, you can follow along here. There are some examples of other attempts to check out as well. Yes - I tried three different versions before getting to this one!
https://box464.com/posts/apple-shortcut-ice-cubes/
til Ice Cubes Refills - A (very) simple apple shortcut@box464 @icecubesapp haha this is epic! Will be useful for the 1.3.0 coming soon :p
@box464 Brilliant!
@box464 Brilliant! Love the name ๐๐
@box464 lol
@box464 @icecubesapp This is awesome and going on my Home Screen! ๐
@box464 @icecubesapp @dimillian Better Icon than IceCubeApp
@athenian_empire @box464 @dimillian Bruh
@dimillian @icecubesapp Just used it! Worked like a charm. :)
@box464 @dgiffin Thanks. Hadnโt thought of adding a shortcut!