This page is for developers who want to support interacting with Focus from their apps.

 

In addition to support for the Share button, Focus has a URI scheme that developers can use to communicate with Focus from their apps. It’s supported on iOS and OS X.

 

Schema

Here’s the schema for communicating with Focus via URI:

focusapp:command?parameter1=value1&parameter2=value2

 

Available commands are

start-timer

open-task  (parameter 1 = name (optional), parameter 2 = note (optional))

add-task (parameter 1 = name (required), parameter 2 = note (optional))

The open-task command displays the task entry window pre-filled with the passed parameters. The add-task command adds a task directly to Focus.

 

Examples:

focusapp:open-task?name=Read%20chapter%204&note=Pages%20304-328

You can just open this as a URL in Safari to check if it's working: focusapp://open-task?name=Read%20chapter%204&note=Pages%20304-328

 

With Focus for iOS 1.4.1 and Focus for Mac 3.2 it's possible to concatenate multiple tasks with the add-task command (name parameter is still required, note is optional) with '&'.

Example: 
focusapp://add-task?name=Read%20chapter%204&note=Pages%20304-328&name=Second%20Task%20&note=with%20note&name=Third%20Task&name=Fourth%20Task

 

 

If you have further questions please get in touch.