Purple App Experience
Offline behaviour

Offlinestart

4min

Purple Apps



Summary

When a user opens the app offline for the first time, content won't load and user permissions can't be verified, preventing the app from launching. To comply with Apple's guidelines, developers can include a customisable offline.html file in template 10.6 that is displayed until the app is connected online. This article explains the app's behaviour and provides more information on enabling the offline.html.



Explanation

If a user has downloaded your Purple App from App Store, and opens it for the first time while being offline, some caveats are happening:

  • No Content will be available.
  • All other data sources that rely on fresh-of-the-press data, like menus (those which are coming from the CMS), may fail.
  • In addition, the app cannot verify some of the users' attributes, i.e. entitlements.

Thus, by default, the app will not start in this case but requires the user to restore connectivity.

Apple's usability guidelines for submitting apps require the app to start, though.

To ensure, the best experience, we introduced a new option for the offline app-start on iOS from Purple App template 10.6.

You can now place an HTML file offline.html in the dynamic resources at /offline/.

It will only be shown during your Purple App's start until it successfully performs an app status request at least once. This request is performing on every app start or app resume.

Due to its ubiquitous nature of being HTML, you are pretty free to design the desired behaviour. It's limited to what's available offline from the dynamic resources bundled with the app on build time. Also, for deploying any changes to it, you'll need to change the dynamic resources accordingly and then rebuild and resubmit the app.