Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| success | Function | No | Callback on successful execution |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
Success Callback
| Property | Type | Description |
|---|---|---|
| envVersion | String | Current environment: develop or release |
Fail Callback
| Property | Type | Description |
|---|---|---|
| error | String | Error code |
| errorMessage | String | Error description |
Error Codes
| Code | Description |
|---|---|
| 3 | An unknown error has occurred |
Code Example
Basic Usage
Using with async/await
Conditional Feature Loading
Display Environment Badge
Use Cases
Debug Logging
Debug Logging
Enable verbose logging only in development:
API Environment Switching
API Environment Switching
Switch between development and production APIs:
Feature Flags
Feature Flags
Enable experimental features in development:
Related APIs
my.getAppIdSync
Get the App ID
my.canIUse
Check feature support