This Week's Sponsor:

Kolide

Ensures that if a device isn’t secure it can’t access your apps.  It’s Device Trust for Okta.


Choosy, Open-Source Framework To Pick Default Apps In Third-Party iOS Apps

Created by Alex Novosad from development studio Substantial and released today as a beta on GitHub, Choosy is a new third-party framework that wants to (at least partially) improve upon iOS’ lack of a default app selection mechanism.

Unlike OS X, iOS doesn’t let users select new default applications for web links, photos, or directions shared through map coordinates; while Google’s Android has long allowed users to set their favorite mobile browser or pick a different email app, Apple has so far stuck on the idea of keeping their own built-in apps as the only default choices for iOS. Alex Novosad said that he had the idea for Choosy at the end of 2013, when he was finishing his first iOS app and realized that he wanted to let users decide which Twitter client to use to open a @username embedded in the app.

Choosy tries to solve a problem that several iOS developers had to face in the past: giving the user options to open links in other, non-default apps. Once implemented by an app, Choosy will present itself as a dialog asking to pick a “favorite” app to open a link. The behavior is akin to what Android does, with some differences: once you pick, say, Chrome as the browser to open web links, that also becomes your new default choice for all links from that specific app going forward; choices can be reset manually, and Choosy is smart in automatically resetting default choices in case of deleted apps.

Choosy’s peculiarity is that, unlike URL schemes or settings developers have to hardcode in their apps, the integration is done server-side. Choosy comes with a “dictionary” of URL schemes organized by app type, so a developer that wants to integrate with Choosy only has to query that dataset (also available on GitHub) instead of including URL schemes manually. The concept is similar to Launch Center Pro’s directory of URL schemes for iOS apps, only meant to be available to any developer willing to include Choosy in their apps.

Instead of writing code specific to each app you want to support (this includes 1st-party apps), you pass generic parameters for the type of app you’re linking to (‘type’ means Twitter, Maps, Browser, Email, etc.). Choosy takes care of detecting installed apps of that type and which parameters each app supports, creating a proper URL for each app based on the supported parameters and app-specific parameter names, and executing that URL to open the app.

In trying to improve upon an area of iOS that’s been ignored by Apple, however, Choosy has been built on a series of limitations and trade-offs caused by a lack of APIs on iOS. Because a single, common database can’t be shared across multiple iOS apps (a problem encountered by Smile with TextExpander touch), the Choosy library of supported apps and icons needs to be downloaded and cached periodically on the device. Sandboxing poses another problem: Choosy can’t store its preferences at a system level for every installed app, which means that each app will have its set of default choices.

Choosy is made for non-jailbroken devices. As such, it’s subject to app sandboxing rules. Until we figure out a way, users’ defaults are stored on a per-app basis. If they select Tweetbot as their default Twitter client in your app, they will have to select it as default again in another app. This is one of the main reasons why we wanted to have the cleanest, simplest UI and affordances possible; if users need to pick default apps multiple times (potentially), the process should be as painless and as consistent as possible.

For Choosy to become as popular as Greg Pierce’s x-callback-url, iOS developers will have to document the URL schemes supported by their apps through requests on GitHub. According to Novosad, features on the Choosy roadmap include better design for the iPad UI, a way to automatically download app icons using the iTunes API, better Accessibility, and, obviously, support for more apps organized in types with different parameters.

The biggest problem with Choosy (and with other third-party solutions aimed at enhancing iOS’ inter-app communication features, like Facebook’s App Links) is that Apple may or may not announce new data sharing functionalities coming to iOS 8 at WWDC. As a platform holder with tight control on iOS, new APIs built by Apple will always be available to developers “for free” with no third-party dependencies and deeper native integration. Rumors about Apple’s upcoming developer conference suggest that the company may be on the cusp of unveiling new inter-app communication features that may make some of Choosy’s requirements and limitations already obsolete by June 2.

Novosad isn’t worried, though. “Maybe iOS 8 will just provide the API for frameworks like Choosy to tap into”, he noted when I asked about upcoming WWDC announcements. “I’m excited to get developer community feedback and improve from there”, he said. “Even if iOS 8 has cool tricks, until this Fall and for apps that remain on iOS 7 we’ll still need something”.

iOS developers interested in implementing Choosy in their apps can check out the project’s page on GitHub.

Unlock More with Club MacStories

Founded in 2015, Club MacStories has delivered exclusive content every week for over six years.

In that time, members have enjoyed nearly 400 weekly and monthly newsletters packed with more of your favorite MacStories writing as well as Club-only podcasts, eBooks, discounts on apps, icons, and services. Join today, and you’ll get everything new that we publish every week, plus access to our entire archive of back issues and downloadable perks.

The Club expanded in 2021 with Club MacStories+ and Club Premier. Club MacStories+ members enjoy even more exclusive stories, a vibrant Discord community, a rotating roster of app discounts, and more. And, with Club Premier, you get everything we offer at every Club level plus an extended, ad-free version of our podcast AppStories that is delivered early each week in high-bitrate audio.

Choose the Club plan that’s right for you:

  • Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with app collections, tips, automation workflows, longform writing, a Club-only podcast, periodic giveaways, and more;
  • Club MacStories+: Everything that Club MacStories offers, plus exclusive content like Federico’s Automation Academy and John’s Macintosh Desktop Experience, a powerful web app for searching and exploring over 6 years of content and creating custom RSS feeds of Club content, an active Discord community, and a rotating collection of discounts, and more;
  • Club Premier: Everything in from our other plans and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.