Mac Developer Tip: Programmatically Starting a Search on the Mac App Store

Working on Transloader 3, I wanted to re-implement the Finder’s Open With… contextual menu:

The Finder's Open With contextual menu

Getting the apps in there turned out to be the easy part. What took some effort was the “App Store…” menu item, as I wanted to precisely replicate its functionality.

Transloader 3's Open With contextual menu

Right-click a file in Finder, select Open With -> App Store…, and it will launch the Mac App Store with a UTI search, for example: uti:public.zip-archive.
This will give you a list of all apps available in the Mac App Store that can handle that file type. Neat!

The ‘macappstores’ URL scheme

The Mac App Store app luckily offers a URL scheme:

  • macappstores://
    Launches the Mac App Store
  • macappstores://showUpdatesPage
    Launches the Mac App Store and takes you directly to your Updates page
  • macappstores://showPurchasesPage
    Launches the Mac App Store and takes you directly to your Purchased page
  • macappstores://itunes.apple.com/app/idYOURAPPID
    Launches the Mac App Store and takes you directly to the product page, identified by the product ID

That’s very practical, but not what I was looking for. I was in need of a way to start a search the way Finder does.

In order to find out the URL Finder uses, I wrote a quick throwaway-app that would overtake the Mac App Store’s URL schemes (using LSSetDefaultHandlerForURLScheme) and print out the URL that was opened.
Alas – no dice. Apparently, Finder uses Apple Events or some other magic that “can not be used in a third-party sandboxed app anyway”™ to do its bidding.

After googling the issue, I found a URL that supposedly worked: macappstores://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?q=searchterm, but just to pour more salt into an already wide-open wound, it only worked on pre-10.9 systems:

The search URL in 10.9-and-beyond systems

Another dead end. Or was it?
I guess I should have experimented with that URL a little, because Jan Vitturi (@jan4843 on twitter) had the answer: just remove “ax.” from the URL, and it works (on both pre-10.9 and post-10.9 systems)!

Using this URL:
macappstores://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?q=searchterm
I was able to get a search going on the Mac App Store, right from within my app.

Sadly, there’s a caveat.
I can’t do a UTI search this way. When I pass (even a percent-escaped) search term along the lines of ‘uti:public.zip-archive’, the Mac App Store tells me there are no results. Reloading that very same page then does show the results – weird and annoying, but nothing I was able to work around.
Using extension:zip seemed to work a little better, but still didn’t return all results a reload would.

Jan Vitturi to the rescue again – the URL’s a little different for UTI or extension searches:
macappstores://search.itunes.apple.com/WebObjects/MZSearch.woa/wa/docTypeLookup?uti=youruti

Alternatively, instead of uti=…, you can use extension=… to search by file path extensions.

My sincere thanks go to Jan Vitturi!

 

Eternal Storms Software Logo

– – – Do you enjoy my blog and/or my software? – – –
Stay up-to-date on all things Eternal Storms Software and join my low-frequency newsletter (one mail a month at most).
Thank you :)

#BlackFriday Deals at Eternal Storms Software

I have a few good deals for you on some of my apps on today’s Black Friday.

Yoink App IconYoink – Simplify and Improve Drag and Drop on your Mac
— 42% off ($3.99 instead of $6.99) —
Website (with 15-day trial)
Purchase on the Mac App Store

ScreenFloat App IconScreenFloat – Use the power of Picture-in-Picture for your Screenshots
— 44% off ($4.99 instead of $8.99) — 
Website (with 15-day trial)
Purchase on the Mac App Store

Glimpses App IconGlimpses – Create Stunning Still Motion Videos from your Photos and Music
— 50% off ($9.99 instead of $19.99) —
Website (with 15-day trial)
Purchase on the Mac App Store

These deals last from today, Black Friday (November 25th 2016) to inclusively Cyber Monday (November 28th, 2016).

Enjoy :)

Eternal Storms Software Logo

– – – Do you enjoy my blog and/or my software? – – –
Stay up-to-date on all things Eternal Storms Software and join my low-frequency newsletter (one mail a month at most).
Thank you :)

Glimpses 2.2 adds Touch Bar Support

Glimpses Icon

Today, Glimpses v2.2, an app that creates Still Motion Videos with just a few clicks, is available for download from the Mac App Store.
It’s a free upgrade for everyone who purchased it before.
A free, 15-day trial is available for download here, even if you’ve tried it before.

What Is Glimpses?

When you want to show your awesome photos from your recent vacation but there are just too many, you can either sort through them and heavy-heartedly decide which ones to toss aside, or you show them all – with a Still Motion Video.
Still Motion Videos show photos in very rapid succession, usually for the fraction of a second. Mix that with a soundtrack, and you can make your video action-packed and powerful, or mellow and soothing. Or even both.

Glimpses lets you create such high-quality videos with just a few clicks. Import your photos (from your Photos.app library, a hard drive, Flickr or Instagram), add one or more soundtracks and you’re set – Glimpses figures out the rest.
The app creates your video in a smart way:

  • The video’s resolution (ranging from 240p to 4K) will be calculated by looking at the smallest photos you supply
  • Its duration is based on the amount of photos you imported, and the duration of the soundtracks you supplied
  • Soundtracks that turn out too long will automatically fade out smoothly at the end of your video, whereas short soundtracks can be looped
  • Pillar- and letterboxes can be eliminated, if the photo’s resolution allows for it
  • Due to built-in facial recognition, photos are positioned in a way that faces aren’t outside of the video’s frame

However, control is always at the user’s fingertips. For example, soundtracks can be edited so only your favorite part of it is used, in an easy-to-use, yet powerful way:

Screenshot of Glimpses' Soundtrack Editor

Additionally, every other aspect of your video can be manually set up:

Screenshot of Glimpses' Video Settings

What’s New in v2.2?

The update adds support for the new MacBook Pro’s Touch Bar.

This enables you, without ever leaving Touch Bar, to quickly:
– import photos from flickr or Instagram

final-resized

– filter, or sort photos in your project

final-copy-2-resized

– control QuickLook

final-copy-resized

– and adjust your project’s audio- and video settings

P.S.: I’m having issues with these 3 GIFs looping. Please reload and scroll down to them if you’d like to see them. My apologies.

Additionally, the update improves its QuickLook Plugin so Glimpses project previews are generated a little quicker and more efficiently.
And lastly, I’ve improved the connection to Instagram, so that should work more reliably.

Pricing and Availability

Glimpses 2.2 is available for purchase on the Mac App Store for the price of $19.99 / £14.99 / €19.99. It is a free update for existing customers of the app.
A free, 15-day trial is available on the website, even if you’ve already tried the app.
Glimpses runs on Macs with OS X Yosemite or newer.

If you’re interested in writing about Glimpses, you can download its press kit here, which contains screenshots, a short sample video and further information. A limited amount of promotional codes are available to members of the press at press(at)eternalstorms(dot)at.

Links

Glimpses Website
http://eternalstorms.at/glimpses
Glimpses on the Mac App Store
https://itunes.apple.com/app/glimpses/id637565340?mt=12
Glimpses 15-Day Trial Direct Download
http://eternalstorms.at/glimpses/Glimpses.zip
Glimpses Press Kit
http://eternalstorms.at/press/Glimpses-2-Press-Kit.zip
Glimpses Sample Video on YouTube
https://youtu.be/NCa4Fg6uLoI

I’m looking forward to hearing from you and to see what you think about Glimpses 2.2.
If you like the app, please consider leaving a little review on the Mac App Store, it would help me out a lot! Should you have any feedback or questions, please be sure to get in touch, I’d love to hear from you!
Thank you.

 

 

Eternal Storms Software Logo

– – – Do you enjoy my blog and/or my software? – – –

Stay up-to-date on all things Eternal Storms Software and join my low-frequency newsletter (one mail a month at most). Thank you :)