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();| Parameter | Type | Required | Description |
|---|---|---|---|
| Nil | Nil | Nil | This action does not require any parameter. |
Structure of Response
| Status | Response |
|---|---|
| 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
- Use this only on apps that support multiple stores.
- After a store change, re-read
Superfans.variables.storeinstead of caching the previous store.
Caveats
- This action opens the native store switcher; it does not switch the store by itself.
- Store switching is available only when the app has multiple stores configured.
Updated about 7 hours ago
Did this page help you?