Adding the Spartacus App to the Home Screen

Note: Spartacus 4.x is no longer maintained. Please upgrade to the latest version.

Note: Spartacus 4.x was tested with SAP Commerce Cloud versions 1905 to 2205. Spartacus 4.x has not been verified to work with (and is not guaranteed to work with) SAP Commerce Cloud 2211 or later releases.

The Add to Home Screen feature allows Spartacus to display a banner prompt that lets users install the progressive Spartacus app on their mobile or desktop devices.

By default, the PWA configuration for Spartacus is the following:

export const defaultPWAModuleConfig: PWAModuleConfig = {
  pwa: {
    enabled: false,
    addToHomeScreen: false,
  },
};

To enable the Add to Home Screen feature, provide the configuration above in your app.module.ts file with both pwa parameters set to true, as follows:

  pwa: {
    enabled: true,
    addToHomeScreen: true,
  },

Once you provide the configuration above and recompile your app, you should see the following:

add to home

Make sure your shell app is running in PWA mode.