projectKey in the binary.
Instead, implement the Authenticator protocol so the SDK fetches a
short-lived bearer token from your backend whenever it needs one.
The protocol
getAuthHeader() whenever it needs a fresh token for
an outbound request. Implementations typically fetch the token from your
server and cache it until expiry. The method may be called from any thread.
Return-value contract
Return the raw bearer token only - do not include theBearer prefix.
The SDK constructs the full Authorization: Bearer <token> header itself.
This differs from the JavaScript SDK’s
IAuthenticator, which returns the full
Bearer ... value. The JS SDK builds the request in userland; the Swift SDK
passes the token through the native layer, which adds the prefix. Don’t copy
the JS convention here.Example
MossClient for
the matching initializer.