Four host events interact with the SDK. The concepts are shared across the
SDKs (read the overview); this page gives the
exact Swift code.
1. App launch (every time, including already-logged-in users)
The most common miss: existing users who installed your app before you added
ClarioDesk never hit the login flow again. Hydrate from your own session on
launch and identify unconditionally. identify() is idempotent and cheap.
2. Fresh login or signup
Right after your auth succeeds:
This overwrites the label on the existing device row. The same device and
hardware key are reused; nothing new is registered.
3. Logout
This preserves the device key while changing the signed identity epoch. In
label-only mode, reset() remains available for full installation isolation.
4. User switch (A → B without app restart)
Await clear before activating user B. reset() deprovisions this installation;
it is not logout or customer erase.
Checking state
What if I never call identify()?
Tickets still work; agents see a device id but no email, and the dashboard shows
an “Unverified device” badge. This is fine for anonymous feedback; otherwise,
wire case 1.