This Week's Sponsor:

Incogni

Put an End to Spam, Scams, and Robocalls on Your iPhone


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.

Access Extra Content and Perks

Founded in 2015, Club MacStories has delivered exclusive content every week for nearly a decade.

What started with weekly and monthly email newsletters has blossomed into a family of memberships designed every MacStories fan.

Learn more here and from our Club FAQs.

Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with apps, tips, automation workflows, longform writing, early access to the MacStories Unwind podcast, periodic giveaways, and more;

Club MacStories+: Everything that Club MacStories offers, plus an active Discord community, advanced search and custom RSS features for exploring the Club’s entire back catalog, bonus columns, and dozens of app discounts;

Club Premier: All of the above and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.