Open Store Switcher

Opens the store switcher in the app.

Description

The openStoreSwitcher() action opens the native store switcher so the user can change the active store.

Function Signature

await Superfans.actions.openStoreSwitcher();
ParameterTypeRequiredDescription
NilNilNilThis action does not require any parameter.

Structure of Response

StatusResponse
Success{ "status": "success", "message": "Store switcher opened successfully" }
Unexpected Error{ "status": "error", "errorId": 500, "errorHandle": "unknown-error", "message": "Something unexpected happened" }

Example Usage

await Superfans.actions.openStoreSwitcher();

Best Practices

  1. Use this only on apps that support multiple stores.
  2. After a store change, re-read Superfans.variables.store instead of caching the previous store.

Caveats

  1. This action opens the native store switcher; it does not switch the store by itself.
  2. Store switching is available only when the app has multiple stores configured.

Did this page help you?