Correct call lifecycle
Connect / connect→Login or Restore→RunFeature→Logout / Close
- Connect / connect
- Creates the application client and loads public configuration. It does not mean an account is signed in or a feature is authorized.
- Login
- Signs in with a customer account from the current Launch store and retrieves the product credential for that account.
- Restore
- Restores a previous session from secure storage. Return to sign-in when no session exists, and never treat an explicit denial as offline success.
- RunFeature
- Checks permission and metering at the actual export, save, calculation, or background-task execution point. The business code must not run after denial.
- Logout
- Clears the current account's session and cache when the customer signs out.
- Close
- Stops heartbeats and the runtime during an ordinary application close while retaining a secure session the user chose to remember.
- ReleaseDevice
- Call this only when the customer explicitly releases a device. Device release, account logout, and application close are three different operations.
Isolate caches by store origin, customer account, product, and payment environment. Keep the client object alive for the application lifetime so floating seats can send policy heartbeats.