Wire the token
Request notification permission and register for remote notifications as you normally would, then forward the raw APNs token:Upload your APNs key once
In the dashboard, open your app’s push settings and upload the APNs auth key (the.p8 file from your Apple Developer
account, with its key id and team id). Delivery then goes ClarioDesk → APNs →
device, from your own Apple credentials.
Route notification taps
0.3.0+ notifications contain an opaque delivery handle, never a ticket id.
Resolve it through the signed SDK and route the authorized result:
await ClarioDeskWidgets.openFromPush(userInfo); it
resolves and presents the exact destination. openTicketFromPush remains only
as the 0.2.x generic refresh compatibility shim.
Custom-screen attention
The prebuilt inbox/thread tracks focus automatically. Custom SwiftUI routes call these fromonAppear/onDisappear; UIKit uses view visibility callbacks:
.inbox for the support inbox. The SDK clears remotely on background and
restores on resume only while the same route remains focused.
iOS delivers a terminated-app notification response after launch. Initialize
ClarioDesk first and defer navigation until the SwiftUI/UIKit router is ready;
otherwise a one-shot open can be emitted before any destination exists.
In a shared handler, distinguish ours without consuming:
Preferences
Already shipping Firebase?
A host that already runs Firebase Messaging can hand the SDK FCM tokens instead: implement thePushTokenProvider protocol against
Messaging.messaging() and pass it in ClarioDeskOptions, or call
ClarioDesk.registerPushToken(token) from your own messaging callback. The
SDK itself never imports Firebase either way.
The attention-aware backend never uses app-wide presence to suppress push.
Only a focused inbox/matching ticket plus an acknowledgement of that rendered
delivery suppresses its banner. Everywhere else alerts immediately; a stale
lease can delay fallback by at most two seconds. See the
push concept page.