x-callback-url Support

About x-callback-url

The x-callback-url specification is a standardized means of specifying inter-app communication on the iOS platform. Third-party apps may implement x-callback-url to provide automated redirection once a specified task is finished.

Launch Center Pro is great for using x-callback-url support in third-party apps, but we also support it for our internal actions. These can be called from thrid-party apps.

Support for Launch Center Pro Actions

In Launch Center Pro, nearly all internal actions support x-callback-url where it would be useful. Here are a few:

  • launch://brightness
  • launch://messaging
  • launch://email
  • launch://dropbox
  • launch://clipboard
  • launch://define (new in 2.2)
  • launch://speak (new in 2.2)

How to Use

Per the x-callback-url spec, you can make any of these perform a callback by adding two things:

  1. Insert x-callback-url directly after the ://
  2. Add an x-success url parameter to the URL

Examples

Add a photo to dropbox, copy the public link, and launch Tweetbot. Install Action

launch://x-callback-url/dropbox/addphoto?attach=photo:last&getlink=yes&x-success=tweetbot%3A%2F%2F

Sends your most recent photo in an email and also in a message. Install Action

launch://x-callback-url/email?to={{sample@contrast.co}}&subject={{Last Photo}}&body=&cc=&bcc=&attach=photo:last&x-success={{launch://messaging?to=555-555-5555&attach=photo:last}}

URL Encode Helper

Notice that the x-success parameter, like all querystring values, must be url-safe or encoded. To make this easier, we offer a special {{}} syntax as you can see in the last example. Text within these brackets will be automatically url encoded at execution time.

Note: For multiple nested x-callback workflows, you may need to manually encode your action as our {{}} helper does not work when nested.

Powered by Zendesk