URL Scheme Tidbits

Been a while since we noted anything much about URL scheme fun and games around here, ’tisn’t it? To refresh your memory, here’s a couple still worthwhile posts:

handleOpenURL.com mentions places to find databases of app’s URL schemes;

x-callback-url described an excellent initiative for standardizing those schemes.

But unfortunately, x-callback-url hasn’t been adopted all that widely so far. But with this new library you have no further excuse not to:

tapsandswipes / InterAppCommunication

x-callback-url made easy

Inter-App Communication, IAC from now on, is a framework that allows your iOS app to communicate, very easily, with other iOS apps installed in the device that supports the x-callback-url protocol. With IAC you can also add an x-callback-url API to your app in a very easy and intuitive way.

IAC currently supports the x-callback-url 1.0 DRAFT specification

If, on the other hand, you have complicated URL schemes that you’re not interested in supporting that with, there’s another new library for you too:

joeldev / JLRoutes

JLRoutes is advanced URL parsing with a block-based callback API. It is designed to make it very easy to handle complex URL schemes in your application without having to do any URL or string parsing of any kind.

  • Simple API with minimal impact to existing codebases
  • Parse any number of parameters interleaved throughout the URL
  • Seamlessly parses out GET URL parameters and passes them along as part of the parameters dictionary
  • Route prioritization
  • Scheme namespaces to easily segment routes and block handlers for multiple schemes
  • Return NO from a handler block for JLRoutes to look for the next matching route
  • Optional verbose logging
  • Pretty-print the whole routing table
  • No dependencies other than Foundation

Look like a good pair of candidates for a mashup, don’t they?

In other news, here’s a clever tip for using URL schemes to activate experimental facilities:

Letterpress 1.4 includes experimental support for Spanish. Type in “letterpress:experimental” in Safari on your device (or just tap that link) to enable the dictionary options. You can then switch the dictionary under More / Language…

We are definitely going to start exposing things like that in our apps. Debug-related functionality is a particularly fertile field; we can think of many occasions indeed when a command like “myapp:throwupdiagnostics” would have been mighty handy indeed to stick in a support reply.

And just to remind you of another clever URL scheme trick, checking to see if they’re handled is a good way of knowing if an app is installed, as demonstrated to slick effect in a Collect Them All Feature!


Courtesy of @viticci, “People doing stuff with URL schemes:”

iOS URL Schemes

UTI definitions are another approach to the problem of data sharing: Using Custom File Types to import data into your iOS Apps

Open Source iOS Library Providing An In-App URL Router

Tutorial: Local App Data Sharing

External Actions: Choosy

The Hit List Diary #22 – URL Scheme discusses iOS 8’s NSURLQueryItem class

usebutton / ios-deeplink-sdk: “A splendid route-matching, block-based way to handle your deep links.”

blackfog / BFGCallbackRouter: “Simple URL router supporting the x-callback-url 1.0 DRAFT spec.”

danielpunkass / UserDefaultsURLHandling.m: “Interpret a custom URL scheme URL as interface to user defaults.”

Alex | March 10, 2013

Leave a Reply