API Documentation

Documentation for developing SailfishOS applications

Sailfish OS MDM Policy Framework

Mobile device management (MDM) is an important requirement for many use cases, allowing the functionality of a particular device or fleet of devices to be restricted or controlled in a variety of ways or in response to certain events (e.g. in the case of a lost or stolen device).

Sailfish OS provides the Sailfish OS MDM Framework to allow permitted MDM applications to apply restrictive policies or to manually enable, disable, or trigger specific functionality on the device.

Disclaimer! The 2nd party API provided by MDM Framework is still in active development and to some extent subject to change. Normal 3rd party API backward compatibility promises don't hold. Follow Together Jolla release notes and Sailfish OS Developers mailing list to get notified of API changes.

Using the Sailfish OS MDM Framework

There are two separate facets to the Sailfish OS MDM Framework. The first facet consists of policies which define whether the user can modify certain settings or access certain functionality, and is provided by libsailfishpolicy. The second facet consists of specific system functionality which is offered to MDM applications but may or may not be available via other system APIs, and this functionality is provided by libsailfishmdm.

To use these libraries, the MDM application should use the pkgconfig files "sailfishpolicy.pc" and "sailfishmdm.pc" respectively.

e.g. in a qmake-based project:

 CONFIG += link_pkgconfig
 PKGCONFIG += sailfishpolicy sailfishmdm

Sailfish OS Policy API

The Sailfish OS Policy API allows the MDM application to write the current policies defined for specific settings or functionality. For example, the MDM application may want to prevent the user from changing the GPS settings.

There are some well-defined policy types which are fully implemented by libsailfishpolicy (that is, setting a policy value for one of these types will result in specific side-effects occurring on device which enforce the policy). These policy types are exposed via the Sailfish::PolicyValue class, with the Sailfish::AccessPolicy providing convenience API. The Sailfish::AccessPolicyPlugin interface exists for writing access policy control plugins.

We use cookies to improve your user experience and to help us to develop our services. By continuing to browse the site, you approve of our use of cookies.