Register a breadcrumb handler to receive lightweight diagnostic events from the Privy iOS and Android SDKs and route them to your own analytics or observability tooling
Breadcrumbs are lightweight diagnostic events emitted as the Privy SDK progresses through key
flows, such as session restoration and wallet creation. Register a breadcrumb handler to receive
these events and forward them to your own analytics, logging, or observability tooling (e.g.
Sentry, Datadog, Firebase).
Breadcrumbs are currently available on the Privy iOS and Android native SDKs only.
Breadcrumbs are for lightweight operational visibility, not full error reporting. Payloads never
contain PII, and handlers must not throw or block, since they’re called synchronously on the
emitting thread.
Additional context for the event. Values are strings only
receive(_:) is called synchronously on the thread that triggered the event. Keep handler
implementations fast and non-blocking, and dispatch any expensive work (network calls, disk
writes) to a background queue.
Emitted when the SDK attempts to restore a cached session on startup.
Event
When it fires
auth.session_restore.started
A prior session was found and restoration has begun
auth.session_restore.completed
The session was successfully refreshed and restored
auth.session_restore.failed
Restoration failed; data.error describes the failure
Show Wallet events
Emitted for embedded wallet creation, migration, and bridge operations.
Event
When it fires
wallet.create.started
Embedded wallet creation began; data.chain-type is ethereum or solana
wallet.create.completed
Embedded wallet creation succeeded
wallet.create.failed
Embedded wallet creation failed; data.error describes the failure
wallet.migration.started
Migration of legacy embedded wallets to the TEE stack began
wallet.migration.completed
Migration completed successfully
wallet.migration.failed
Migration failed; data.error describes the failure
wallet.bridge.failed
The webview/iframe bridge failed to complete an operation (timeout or transport error), as opposed to the operation being rejected by the server
On iOS, data.error is a stable, non-sensitive error code (the PrivyError code hierarchy, or
just the Swift type name for non-PrivyError types). On Android, data.error is currently the
underlying exception’s message. Avoid logging Android data.error values to systems where raw
exception messages shouldn’t be stored, and treat both as best-effort diagnostic strings rather
than a stable enum.
Because breadcrumbs carry no PII and are cheap to emit, it’s safe to register a handler in every
build configuration, including production. Gate any verbose console logging (like the examples in
step 1) behind a debug flag.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Privy Docs","colors":{"primary":"#010110","light":"#FFFFFF"},"logo":{"light":"https://mintcdn.com/privy-c2af3412/Ih_Fo3QYM486gzWq/logo/privy-logo-light.png?fit=max\u0026auto=format\u0026n=Ih_Fo3QYM486gzWq\u0026q=85\u0026s=bd297b680ace8a13db4d9ce977f93180","dark":"https://mintcdn.com/privy-c2af3412/Ih_Fo3QYM486gzWq/logo/privy-logo-dark.png?fit=max\u0026auto=format\u0026n=Ih_Fo3QYM486gzWq\u0026q=85\u0026s=24d83970695ab19a1803a2eb00dbea4e"},"favicon":"https://mintcdn.com/privy-c2af3412/YByWVKlFbSpnpSJG/favicon.png?fit=max\u0026auto=format\u0026n=YByWVKlFbSpnpSJG\u0026q=85\u0026s=ee4038168ea586e5f72041e5e2a1f5c8","api":{"openapi":{"source":"https://api.staging.privy.io/v1/openapi.json"},"playground":{"display":"interactive"},"examples":{"languages":["curl","java","javascript","php","go"]},"mdx":{"server":"https://api.privy.io"}},"background":{"color":{"light":"#FFFFFF","dark":"#010110"}},"navbar":{"links":[{"href":"https://demo.privy.io","label":"Demo"},{"href":"https://privy.io/slack","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.privy.io"}},"seo":{"metatags":{"og:type":"website","og:site_name":"Privy Docs","og:image":"https://assets.privy.io/docs-og.png","twitter:title":"Privy Docs","twitter:card":"summary_large_image","twitter:image":"https://assets.privy.io/docs-og.png"},"organization":{"id":"https://www.privy.io/#organization","name":"Privy","url":"https://www.privy.io","logo":"https://assets.privy.io/docs-og.png","sameAs":["https://x.com/privy_io","https://github.com/privy-io"]}},"styling":{"codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-WV9MVTB3"}},"contextual":{"options":["claude","chatgpt","cursor","vscode","mcp","copy","view"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"privy-c2af3412","hasAudioNarration":false,"actualSubdomain":"privy-c2af3412","customDomains":["docs.privy.io"],"gitSource":{"type":"github","owner":"privy-io","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"issues":true,"thumbs":true,"edits":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aee6add0cb48ef71e0f1964","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"Wallets","count":291},{"language":"default","tag":"API reference","count":255},{"language":"default","tag":"Recipes","count":141},{"language":"default","tag":"All recipes","count":140},{"language":"default","tag":"Identity","count":137},{"language":"default","tag":"Signatures and transactions","count":91},{"language":"default","tag":"Users","count":87},{"language":"default","tag":"Basics","count":86},{"language":"default","tag":"Financial flows","count":82},{"language":"default","tag":"Controls","count":76}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/_mintlify/custom/privy-c2af3412/106de3f982828597/style.css"}],"page":{"pagePath":"recipes/mobile-breadcrumbs","slug":"/recipes/mobile-breadcrumbs","pageMetadata":{"title":"Mobile SDK breadcrumbs","description":"Register a breadcrumb handler to receive lightweight diagnostic events from the Privy iOS and Android SDKs and route them to your own analytics or observability tooling","keywords":["iOS","Swift","Android","Kotlin","breadcrumbs","observability","analytics","PrivyBreadcrumbHandler","diagnostics"],"href":"/recipes/mobile-breadcrumbs"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Register a breadcrumb handler to receive lightweight diagnostic events from the Privy iOS and Android SDKs and route them to your own analytics or observability tooling\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Info,Table,Tip,View,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!View)_missingMdxReference(`View`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Breadcrumbs are lightweight diagnostic events emitted as the Privy SDK progresses through key\nflows`}),`, such as session restoration and wallet creation. Register a breadcrumb handler to receive\nthese events and forward them to your own analytics, logging, or observability tooling (e.g.\nSentry, Datadog, Firebase).`]}),`\n`,_jsx(Info,{children:`Breadcrumbs are currently available on the Privy iOS and Android native SDKs only.`}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Breadcrumbs are for lightweight operational visibility, not full error reporting. Payloads never\ncontain PII, and handlers must not throw or block, since they’re called synchronously on the\nemitting thread.`})}),`\n`,_jsx(Heading,{level:`3`,id:`1-register-a-breadcrumb-handler`,children:`1. Register a breadcrumb handler`}),`\n`,_jsxs(_components.p,{children:[`Implement the platform’s breadcrumb handler interface and pass it to your `,_jsx(_components.code,{children:`PrivyConfig`}),` when\ninitializing the SDK.`]}),`\n`,_jsx(View,{title:`iOS`,icon:`swift`,id:`ios`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PrivySDK`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`struct`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` LoggingBreadcrumbHandler`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`PrivyBreadcrumbHandler `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` receive`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` breadcrumb`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: PrivyBreadcrumb) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PrivyBreadcrumb: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\\\\(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`breadcrumb.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` timestamp=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\\\\(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`breadcrumb.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` data=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\\\\(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`breadcrumb.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Forward to your analytics or observability tool, e.g.:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Analytics.track(breadcrumb.event, properties: breadcrumb.data)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` PrivyConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` appId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: privyAppId,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` appClientId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: privyAppClientId,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` breadcrumbHandler`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`LoggingBreadcrumbHandler`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})}),`\n`,_jsxs(View,{title:`Android`,icon:`android`,id:`android`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` io.privy.breadcrumbs.PrivyBreadcrumbHandler`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` io.privy.sdk.PrivyConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` config = PrivyConfig(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appId = privyAppId,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appClientId = privyAppClientId,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` breadcrumbHandler = PrivyBreadcrumbHandler { breadcrumb ->`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Log.d(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PrivyBreadcrumb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:'\"${breadcrumb.event} timestamp=${breadcrumb.timestamp} data=${breadcrumb.data}\"'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Forward to your analytics or observability tool, e.g.:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // analytics.track(breadcrumb.event, breadcrumb.data)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`PrivyBreadcrumbHandler`}),` is a functional interface, so a lambda works directly wherever a\n`,_jsx(_components.code,{children:`PrivyConfig`}),` is constructed.`]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`breadcrumbHandler`}),` is optional. If it’s omitted, the SDK emits no breadcrumbs and there’s no\nperformance cost.`]}),`\n`,_jsx(Heading,{level:`3`,id:`2-breadcrumb-payload-shape`,children:`2. Breadcrumb payload shape`}),`\n`,_jsx(_components.p,{children:`Every breadcrumb exposes the same three fields, regardless of event type:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`event`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String`})}),_jsxs(_components.td,{children:[`Dotted event name, e.g. `,_jsx(_components.code,{children:`auth.session_restore.started`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`timestamp`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Date`}),` (iOS) / `,_jsx(_components.code,{children:`Long`}),` epoch millis (Android)`]}),_jsx(_components.td,{children:`The time the event occurred`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`[String: String]`}),` (iOS) / `,_jsx(_components.code,{children:`Map\u003cString, String>`}),` (Android)`]}),_jsx(_components.td,{children:`Additional context for the event. Values are strings only`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`receive(_:)`}),` is called synchronously on the thread that triggered the event. Keep handler\nimplementations fast and non-blocking, and dispatch any expensive work (network calls, disk\nwrites) to a background queue.`]}),`\n`,_jsx(Heading,{level:`3`,id:`3-available-breadcrumb-events`,children:`3. Available breadcrumb events`}),`\n`,_jsxs(Expandable,{title:`Session restore events`,children:[_jsx(_components.p,{children:`Emitted when the SDK attempts to restore a cached session on startup.`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Event`}),_jsx(_components.th,{children:`When it fires`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`auth.session_restore.started`})}),_jsx(_components.td,{children:`A prior session was found and restoration has begun`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`auth.session_restore.completed`})}),_jsx(_components.td,{children:`The session was successfully refreshed and restored`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`auth.session_restore.failed`})}),_jsxs(_components.td,{children:[`Restoration failed; `,_jsx(_components.code,{children:`data.error`}),` describes the failure`]})]})]})]})]}),`\n`,_jsxs(Expandable,{title:`Wallet events`,children:[_jsx(_components.p,{children:`Emitted for embedded wallet creation, migration, and bridge operations.`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Event`}),_jsx(_components.th,{children:`When it fires`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`wallet.create.started`})}),_jsxs(_components.td,{children:[`Embedded wallet creation began; `,_jsx(_components.code,{children:`data.chain-type`}),` is `,_jsx(_components.code,{children:`ethereum`}),` or `,_jsx(_components.code,{children:`solana`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`wallet.create.completed`})}),_jsx(_components.td,{children:`Embedded wallet creation succeeded`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`wallet.create.failed`})}),_jsxs(_components.td,{children:[`Embedded wallet creation failed; `,_jsx(_components.code,{children:`data.error`}),` describes the failure`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`wallet.migration.started`})}),_jsx(_components.td,{children:`Migration of legacy embedded wallets to the TEE stack began`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`wallet.migration.completed`})}),_jsx(_components.td,{children:`Migration completed successfully`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`wallet.migration.failed`})}),_jsxs(_components.td,{children:[`Migration failed; `,_jsx(_components.code,{children:`data.error`}),` describes the failure`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`wallet.bridge.failed`})}),_jsx(_components.td,{children:`The webview/iframe bridge failed to complete an operation (timeout or transport error), as opposed to the operation being rejected by the server`})]})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`On iOS, `,_jsx(_components.code,{children:`data.error`}),` is a stable, non-sensitive error code (the `,_jsx(_components.code,{children:`PrivyError`}),` code hierarchy, or\njust the Swift type name for non-`,_jsx(_components.code,{children:`PrivyError`}),` types). On Android, `,_jsx(_components.code,{children:`data.error`}),` is currently the\nunderlying exception’s message. Avoid logging Android `,_jsx(_components.code,{children:`data.error`}),` values to systems where raw\nexception messages shouldn’t be stored, and treat both as best-effort diagnostic strings rather\nthan a stable enum.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`4-example-forwarding-to-sentry`,children:`4. Example: forwarding to Sentry`}),`\n`,_jsx(View,{title:`iOS`,icon:`swift`,id:`ios-1`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Sentry`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`struct`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SentryBreadcrumbHandler`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`PrivyBreadcrumbHandler `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` receive`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` breadcrumb`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: PrivyBreadcrumb) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crumb `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` Breadcrumb`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`level`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: .`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`info`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`category`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"privy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crumb.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` breadcrumb.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crumb.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` breadcrumb.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SentrySDK.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`addBreadcrumb`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(crumb)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(View,{title:`Android`,icon:`android`,id:`android-1`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` io.sentry.Breadcrumb`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` io.sentry.Sentry`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` io.privy.breadcrumbs.PrivyBreadcrumbHandler`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sentryBreadcrumbHandler = PrivyBreadcrumbHandler { breadcrumb ->`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` crumb = Breadcrumb().apply {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` message = breadcrumb.event`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` category = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"privy\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` breadcrumb.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.forEach { (key, value) -> setData(key, value) }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sentry.addBreadcrumb(crumb)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Because breadcrumbs carry no PII and are cheap to emit, it’s safe to register a handler in every\nbuild configuration, including production. Gate any verbose console logging (like the examples in\nstep 1) behind a debug flag.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Mobile SDK breadcrumbs","description":"Register a breadcrumb handler to receive lightweight diagnostic events from the Privy iOS and Android SDKs and route them to your own analytics or observability tooling","keywords":["iOS","Swift","Android","Kotlin","breadcrumbs","observability","analytics","PrivyBreadcrumbHandler","diagnostics"],"href":"/recipes/mobile-breadcrumbs"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Register a breadcrumb handler","slug":"1-register-a-breadcrumb-handler","depth":3,"children":[]},{"title":"2. Breadcrumb payload shape","slug":"2-breadcrumb-payload-shape","depth":3,"children":[]},{"title":"3. Available breadcrumb events","slug":"3-available-breadcrumb-events","depth":3,"children":[]},{"title":"4. Example: forwarding to Sentry","slug":"4-example-forwarding-to-sentry","depth":3,"children":[]}],"multiViewItems":[{"title":"iOS","content":"```swift theme={\"system\"}\nimport PrivySDK\n\nstruct LoggingBreadcrumbHandler: PrivyBreadcrumbHandler {\n func receive(_ breadcrumb: PrivyBreadcrumb) {\n print(\"PrivyBreadcrumb: \\(breadcrumb.event) timestamp=\\(breadcrumb.timestamp) data=\\(breadcrumb.data)\")\n // Forward to your analytics or observability tool, e.g.:\n // Analytics.track(breadcrumb.event, properties: breadcrumb.data)\n }\n}\n\nlet config = PrivyConfig(\n appId: privyAppId,\n appClientId: privyAppClientId,\n breadcrumbHandler: LoggingBreadcrumbHandler()\n)\n```\n","icon":"swift","id":"ios","active":true},{"title":"Android","content":"```kotlin theme={\"system\"}\nimport io.privy.breadcrumbs.PrivyBreadcrumbHandler\nimport io.privy.sdk.PrivyConfig\n\nval config = PrivyConfig(\n appId = privyAppId,\n appClientId = privyAppClientId,\n breadcrumbHandler = PrivyBreadcrumbHandler { breadcrumb ->\n Log.d(\"PrivyBreadcrumb\", \"${breadcrumb.event} timestamp=${breadcrumb.timestamp} data=${breadcrumb.data}\")\n // Forward to your analytics or observability tool, e.g.:\n // analytics.track(breadcrumb.event, breadcrumb.data)\n },\n)\n```\n\n`PrivyBreadcrumbHandler` is a functional interface, so a lambda works directly wherever a\n`PrivyConfig` is constructed.\n","icon":"android","id":"android","active":false}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/privy-c2af3412/9a6cfa36ced76db0/welcome.js","/_mintlify/custom/privy-c2af3412/1af79d46bd64cd8b/fullstory.js","/_mintlify/custom/privy-c2af3412/e4d91321024fde21/recipes/recipes-search.js","/_mintlify/custom/privy-c2af3412/d31c5451398ab22c/check-links.js"],"subdomain":"privy-c2af3412","siteName":"Privy Docs","title":"Mobile SDK breadcrumbs - Privy Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-09T19:58:01.448Z","originalFileLocation":"recipes/mobile-breadcrumbs.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Register a breadcrumb handler to receive lightweight diagnostic events from the Privy iOS and Android SDKs and route them to your own analytics or observability tooling\">\u003cmeta data-mint-head name=\"application-name\" content=\"Privy Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Mobile SDK breadcrumbs - Privy Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Register a breadcrumb handler to receive lightweight diagnostic events from the Privy iOS and Android SDKs and route them to your own analytics or observability tooling\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Privy Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.privy.io/recipes/mobile-breadcrumbs\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://assets.privy.io/docs-og.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Privy Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Register a breadcrumb handler to receive lightweight diagnostic events from the Privy iOS and Android SDKs and route them to your own analytics or observability tooling\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://assets.privy.io/docs-og.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/privy-c2af3412/bJgmnaRQwH8sO8y5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Privy Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#010110\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.privy.io/recipes/mobile-breadcrumbs\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/recipes/mobile-breadcrumbs.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.privy.io/#organization\",\"name\":\"Privy\",\"url\":\"https://www.privy.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://assets.privy.io/docs-og.png\"},\"sameAs\":[\"https://x.com/privy_io\",\"https://github.com/privy-io\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.privy.io#website\",\"name\":\"Privy Docs\",\"url\":\"https://docs.privy.io\",\"publisher\":{\"@id\":\"https://www.privy.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.privy.io/recipes/mobile-breadcrumbs#webpage\",\"url\":\"https://docs.privy.io/recipes/mobile-breadcrumbs\",\"name\":\"Mobile SDK breadcrumbs\",\"description\":\"Register a breadcrumb handler to receive lightweight diagnostic events from the Privy iOS and Android SDKs and route them to your own analytics or observability tooling\",\"dateModified\":\"2026-09-09T19:58:01.448Z\",\"isPartOf\":{\"@id\":\"https://docs.privy.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.privy.io/recipes/mobile-breadcrumbs#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.privy.io/recipes/mobile-breadcrumbs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"All recipes\",\"item\":\"https://docs.privy.io/recipes/authentication/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mobile\",\"item\":\"https://docs.privy.io/recipes/mobile-key-export\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Mobile SDK breadcrumbs\",\"item\":\"https://docs.privy.io/recipes/mobile-breadcrumbs\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.privy.io/recipes/mobile-breadcrumbs#article\",\"headline\":\"Mobile SDK breadcrumbs\",\"name\":\"Mobile SDK breadcrumbs\",\"description\":\"Register a breadcrumb handler to receive lightweight diagnostic events from the Privy iOS and Android SDKs and route them to your own analytics or observability tooling\",\"url\":\"https://docs.privy.io/recipes/mobile-breadcrumbs\",\"mainEntityOfPage\":{\"@id\":\"https://docs.privy.io/recipes/mobile-breadcrumbs#webpage\"},\"image\":\"https://assets.privy.io/docs-og.png\",\"dateModified\":\"2026-09-09T19:58:01.448Z\",\"keywords\":\"iOS, Swift, Android, Kotlin, breadcrumbs, observability, analytics, PrivyBreadcrumbHandler, diagnostics\",\"publisher\":{\"@id\":\"https://www.privy.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.privy.io#website\"}}]}\u003c/script>","siteName":"Privy Docs","nav":{"global":null,"tabs":[{"tab":"Basics","pages":[{"title":"Basics","href":"/basics/get-started/about"}]},{"tab":"Wallets","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/wallets/overview"}]},{"item":"Embedded wallets","pages":[{"title":"Embedded wallets","href":"/wallets/overview/embedded"}]},{"item":"Organization wallets","pages":[{"title":"Organization wallets","href":"/organizations/overview"}]},{"item":"External wallets","pages":[{"title":"External wallets","href":"/wallets/connectors/overview"}]},{"item":"Signatures and transactions","pages":[{"title":"Signatures and transactions","href":"/wallets/signatures-and-transactions"}]},{"item":"Balances and webhooks","pages":[{"title":"Balances and webhooks","href":"/wallets/gas-and-asset-management/assets/overview"}]},{"item":"Gas and fee management","pages":[{"title":"Gas and fee management","href":"/wallets/gas-and-asset-management/gas/overview"}]}],"pages":[{"title":"Wallets","href":"/wallets/overview"}]},{"tab":"Financial flows","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/financial-flows/overview"}]},{"item":"Deposits","pages":[{"title":"Deposits","href":"/financial-flows/deposits/overview"}]},{"item":"Payouts","pages":[{"title":"Payouts","href":"/financial-flows/payouts/overview"}]},{"item":"Earn","pages":[{"title":"Earn","href":"/wallets/actions/earn/overview"}]},{"item":"Cards","pages":[{"title":"Cards","href":"/financial-flows/cards/overview"}]},{"item":"Trade","pages":[{"title":"Trade","href":"/wallets/actions/swap/overview"}]},{"item":"Monetization","pages":[{"title":"Monetization","href":"/financial-flows/monetization"}]},{"item":"Treasury management","pages":[{"title":"Treasury management","href":"/treasury-management/overview"}]},{"item":"Private transactions","pages":[{"title":"Private transactions","href":"/financial-flows/private-transactions"}]}],"pages":[{"title":"Financial flows","href":"/financial-flows/overview"}]},{"tab":"Controls and policies","menu":[{"item":"Controls","pages":[{"title":"Controls","href":"/controls/overview"}]},{"item":"Policies","pages":[{"title":"Policies","href":"/controls/policies/overview"}]},{"item":"Manual approvals","pages":[{"title":"Manual approvals","href":"/controls/dashboard/overview"}]}],"pages":[{"title":"Controls and policies","href":"/controls/overview"}]},{"tab":"Identity","menu":[{"item":"Authentication","pages":[{"title":"Authentication","href":"/authentication/overview"}]},{"item":"Users","pages":[{"title":"Users","href":"/user-management/users/overview"}]},{"item":"KYC and KYB","pages":[{"title":"KYC and KYB","href":"/kyc-kyb/overview"}]}],"pages":[{"title":"Identity","href":"/authentication/overview"}]},{"tab":"Security","pages":[{"title":"Security","href":"/security/overview"}]},{"tab":"Recipes","pages":[{"title":"Recipes","sidebarTitle":"Overview","mode":"wide","href":"/recipes/overview"},{"group":"All recipes","pages":[{"group":"Authentication","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Authentication","href":"/recipes/authentication/overview"},{"title":"Setting up SMS or WhatsApp login","href":"/recipes/dashboard/login-methods/sms-whatsapp"},{"title":"Guest accounts","href":"/recipes/react/guest-accounts"},{"title":"Login with Apple","href":"/recipes/swift/apple"},{"title":"Login with Farcaster","href":"/recipes/farcaster/login"},{"title":"Login with Lens","href":"/recipes/lens"},{"title":"Use tokens from OAuth providers","href":"/recipes/react/oauth-tokens"},{"title":"Migrating embedded wallets from Alchemy to Privy","href":"/recipes/migrating-embedded-wallets-from-alchemy"},{"title":"Migrating JWT authentication from Alchemy to Privy","href":"/recipes/migrating-jwt-authentication-from-alchemy"},{"title":"Using Supabase as an authentication provider","href":"/recipes/authentication/using-supabase-for-custom-auth"},{"title":"Worldcoin mini app SIWE with Privy","href":"/recipes/react/worldcoin-siwe-guide"},{"title":"Chrome extension authentication","href":"/recipes/react/chrome-extension"},{"title":"Mocking tokens for testing","href":"/recipes/mock-jwt"},{"title":"Configure cookies","href":"/recipes/react/cookies"},{"title":null,"href":"/recipes/using-test-accounts"},{"title":"Migrating sign in with Apple users for an Apple team transfer","href":"/recipes/apple-team-migration"}]},{"group":"Wallet infrastructure","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Wallet infrastructure","href":"/recipes/wallet-infrastructure/overview"},{"title":"Hierarchical deterministic (HD) wallets","href":"/recipes/hd-wallets"},{"title":"Pregenerating wallets","href":"/recipes/pregenerate-wallets"},{"sidebarTitle":"Agentic wallets","title":"Agentic wallets","href":"/recipes/agent-integrations/agentic-wallets"},{"title":"Server-side user wallets","href":"/recipes/wallets/server-side-user-wallets"},{"title":"Enabling users or servers to execute transactions","href":"/recipes/wallets/user-and-server-signers"},{"title":"Using passkeys with wallets","href":"/recipes/passkey-server-wallets"},{"title":"Policy-based MFA","href":"/recipes/policy-based-mfa"},{"title":"Using stateful policies with Privy","href":"/recipes/using-stateful-policies"},{"title":"Migrating wallets from on-device to TEEs","href":"/recipes/tee-wallet-migration-guide"},{"title":"Tier 1 wallet integration","href":"/recipes/tier-1-wallet-integration"},{"title":"Tier 2 wallet integration","href":"/recipes/tier-2-wallet-integration"},{"title":"Custom account abstraction implementation","href":"/recipes/account-abstraction/custom-implementation"},{"title":"Storing smart account addresses","href":"/recipes/account-abstraction/address"},{"title":"Integrating smart accounts with wagmi","href":"/recipes/account-abstraction/wagmi"},{"title":"Create a smart wallet on iOS and Android","href":"/recipes/account-abstraction/native-mobile"},{"title":"2-of-2 quorum: user and server as co-signers","href":"/recipes/wallets/two-of-two-server-in-the-loop"}]},{"group":"Account funding","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Account funding","href":"/recipes/account-funding/overview"},{"title":"Stripe embedded onramp","href":"/recipes/stripe-embedded-onramp"},{"title":"Using Privy and Due for on/off ramping","href":"/recipes/due-on-off-ramp"},{"title":"Onramping to MXNB with Juno","href":"/recipes/bitso-mxnb-onramp"}]},{"group":"Transactions \u0026 signing","expanded":false,"pages":[{"group":"EVM","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"EVM transactions and signing","href":"/recipes/evm/overview"},{"title":"Sending OUSD (or other ERC-20s)","href":"/recipes/send-ousd"},{"title":"Sending USDC (or other ERC-20s)","href":"/recipes/send-usdc"},{"title":"Sending batch transactions","href":"/recipes/batch-transactions"},{"title":"Speeding up transactions on EVM chains","href":"/recipes/speeding-up-transactions"},{"sidebarTitle":"Flashblocks","title":"Using Flashblocks with Privy","href":"/recipes/evm/flashblocks"},{"title":"Integrating with EIP-7702","href":"/recipes/react/eip-7702"},{"title":"ERC-1271 signatures","href":"/recipes/evm/erc-1271-signatures"}]},{"group":"Solana","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Solana transactions and signing","href":"/recipes/solana/overview"},{"title":"Getting started with Privy and Solana","href":"/recipes/solana/getting-started-with-privy-and-solana"},{"title":"Sending a SOL transaction","href":"/recipes/solana/send-sol"},{"title":"Sending SPL tokens","href":"/recipes/solana/send-spl-tokens"}]},{"group":"Bitcoin","expanded":false,"pages":[{"title":"Using Spark BTC with Privy wallets","href":"/recipes/spark-btc-guide"}]}]},{"group":"Gas sponsorship","expanded":false,"pages":[{"title":"Custom gas sponsorship rate limits","href":"/recipes/gas-sponsorship-rate-limits"},{"title":"Integrating OneBalance","href":"/recipes/one-balance"},{"title":"Sponsor gas on Tron with Transatron","sidebarTitle":"Sponsor gas on Tron with Transatron","href":"/recipes/tron/transatron"}]},{"group":"Treasury","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Treasury","href":"/recipes/wallets/treasury-overview"},{"sidebarTitle":"Treasury","title":"Treasury setup","href":"/recipes/wallets/wallet-infrastructure"},{"sidebarTitle":"Execution wallets","title":"Execution wallets","href":"/recipes/wallets/execution-wallets"}]},{"group":"Swaps","expanded":false,"pages":[{"title":"Swapping crypto using Privy and 0x","href":"/recipes/swap-with-0x"},{"title":"Swapping crypto using Privy and Bebop","href":"/recipes/evm/bebop-swap-guide"}]},{"group":"Payments","expanded":false,"pages":[{"title":"Pay with WalletConnect pay","href":"/recipes/walletconnect-pay"},{"title":"Bridge cards","href":"/recipes/bridge-cards"},{"title":"Send to Africa with Zuba","href":"/recipes/send-to-africa"},{"title":"Accept stablecoin payments with automatic fiat conversion","href":"/recipes/stablecoin-payments-bridge-stripe"}]},{"group":"Trading","expanded":false,"pages":[{"sidebarTitle":"Overview","title":"Trading","href":"/recipes/trading/overview"},{"title":"Polymarket builder codes","href":"/recipes/polymarket-guide"},{"title":"Trading apps resource page","href":"/recipes/trading-apps-homepage"},{"sidebarTitle":"Server-side access","title":"Enabling server-side access to user wallets","href":"/recipes/wallets/session-signer-use-cases/server-side-access"},{"title":"Bankr Twitter bot guide","href":"/recipes/agent-integrations/bankr-bot-guide"},{"title":"Building a Telegram trading bot","href":"/recipes/telegram-bot"},{"sidebarTitle":"Limit orders","title":"Using signers to execute limit orders with wallets","href":"/recipes/wallets/session-signer-use-cases/limit-orders"},{"title":"Trade on Lighter","href":"/recipes/lighter-guide"}]},{"group":"External wallets","expanded":false,"pages":[{"title":"Wallet list configuration recipes","sidebarTitle":"Wallet list recipes","href":"/recipes/react/wallet-list-configurations"},{"title":"Configuring external connectors","href":"/recipes/react/configuring-external-connectors"},{"title":"Using Solana standard wallets","href":"/recipes/solana/standard-wallets"},{"title":"Integrating Solana mobile wallet adapter","href":"/recipes/solana/adding-solana-mwa"}]},{"group":"Tempo","pages":[{"title":"Overview","href":"/recipes/tempo/overview"},{"title":"Using Tempo with Privy","href":"/recipes/tempo/send-transactions"},{"title":"Receive policies","href":"/recipes/tempo/receive-policies"},{"title":"Deposit from Stellar to Tempo","href":"/recipes/tempo/stellar-deposit-address"}]},{"group":"Hyperliquid","expanded":false,"pages":[{"title":"Quickstart","href":"/recipes/hyperliquid-guide"},{"title":"Agent wallets","href":"/recipes/hyperliquid/agents-and-subaccounts"},{"title":"Executing trades","href":"/recipes/hyperliquid/trading-patterns"},{"title":"Policies","href":"/recipes/hyperliquid/policies-and-offline-actions"},{"title":"HyperEVM","href":"/recipes/hyperliquid/hyperevm"},{"group":"Advanced","expanded":false,"pages":[{"title":"Client-side SDKs","href":"/recipes/hyperliquid/client-side-usage"},{"title":"Subaccounts","href":"/recipes/hyperliquid/subaccounts"},{"title":"Builder codes","href":"/recipes/hyperliquid/builder-codes"}]}]},{"group":"Earn and borrow","expanded":false,"pages":[{"title":"Overview","href":"/recipes/yield/overview"},{"title":"Reading Earn vault totals onchain","sidebarTitle":"Earn totals onchain","href":"/recipes/yield/earn-onchain-totals"},{"sidebarTitle":"Aave","title":"Integrating Aave with Privy","href":"/recipes/yield/aave-guide"},{"sidebarTitle":"Ethena","title":"Integrating Ethena with Privy","href":"/recipes/yield/ethena-guide"},{"sidebarTitle":"Sky savings","title":"Integrating Sky savings with Privy","href":"/recipes/yield/sky-savings-guide"},{"sidebarTitle":"Kamino","title":"Integrating Kamino with Privy","href":"/recipes/yield/kamino-guide"},{"sidebarTitle":"Pods","title":"Integrating Pods with Privy","href":"/recipes/yield/pods-guide"},{"sidebarTitle":"Yield.xyz AgentKit","title":"Using Privy server wallets with yield.xyz AgentKit","href":"/recipes/yield/yield-agentkit-guide"},{"sidebarTitle":"Ground","title":"Integrating Ground gtokens with Privy","href":"/recipes/yield/ground-guide"},{"title":"Borrow with Morpho","sidebarTitle":"Borrow with Morpho","href":"/recipes/yield/morpho-borrow"},{"sidebarTitle":"Dolomite USD1 markets","title":"Earn yield with markets powered by Dolomite","href":"/recipes/community/dolomite-guide"}]},{"group":"AI \u0026 agents","expanded":false,"pages":[{"title":"Overview","href":"/recipes/agent-integrations/overview"},{"sidebarTitle":"Agent CLI","title":"Agent CLI","href":"/recipes/agent-integrations/agent-cli"},{"sidebarTitle":"Agent wallet access via CLI/MCP/Skills","title":"Authorized wallet access for self-hosted agents","href":"/recipes/agent-integrations/agent-authorization"},{"sidebarTitle":"AI robo-advisor agent","title":"Build a robo-advisor with Hermes agents and Robinhood chain","href":"/recipes/agent-integrations/robo-advisor-agent"},{"title":"Machine Payments Protocol (MPP)","href":"/recipes/agent-integrations/mpp"},{"title":"x402","href":"/recipes/agent-integrations/x402"},{"title":"Sanctions screening for x402 payments","href":"/recipes/agent-integrations/x402-sanctions-screening"},{"title":"Amazon Bedrock AgentCore","href":"/recipes/agent-integrations/agentcore-payments"},{"title":"OpenClaw agentic wallets","href":"/recipes/agent-integrations/openclaw-agentic-wallets"},{"title":"Privy Agent on auto.exchange","href":"/recipes/agent-integrations/auto-exchange-privy-agent"},{"title":"Virtuals EconomyOS with Privy wallets","sidebarTitle":"Virtuals EconomyOS","href":"/recipes/agent-integrations/virtuals-economyos"}]},{"group":"Social \u0026 mini apps","expanded":false,"pages":[{"title":"Build World mini apps with Privy","href":"/recipes/world/mini-apps"},{"title":"Building a Farcaster mini app","href":"/recipes/farcaster/mini-apps"},{"title":"Writing to Farcaster","href":"/recipes/farcaster/writes"}]},{"group":"UI customization and whitelabeling","expanded":false,"pages":[{"title":"Configuring wallet confirmation modals","href":"/recipes/react/manage-wallet-UIs"},{"title":"Whitelabel","href":"/recipes/react/whitelabel"},{"title":"Setting a system theme for the Privy modal","href":"/recipes/system-theme"}]},{"group":"Dashboard","expanded":false,"pages":[{"title":"Configure account transfer","href":"/recipes/dashboard/account-transfer"},{"title":"Recovering assets from a dashboard wallet","href":"/recipes/dashboard/recovering-assets"},{"title":"Bot traffic mitigation","href":"/recipes/dashboard/preventing-bots"},{"title":"Configure allowed URLs","href":"/recipes/dashboard/allowed-domains"},{"title":"Configure allowed OAuth redirect URLs","href":"/recipes/react/allowed-oauth-redirects"},{"title":"Managing your allowlist with Airtable","href":"/recipes/dashboard/airtable"},{"title":"Customize your application","href":"/recipes/dashboard/customization"},{"title":"Single sign-on","href":"/basics/get-started/dashboard/sso"}]},{"group":"Data","expanded":false,"pages":[{"title":"Analyze Privy data with Stripe","href":"/recipes/data/stripe"}]},{"group":"Mobile","expanded":false,"pages":[{"title":"Exporting wallet keys from mobile apps","description":null,"href":"/recipes/mobile-key-export"},{"title":"Mobile SDK breadcrumbs","href":"/recipes/mobile-breadcrumbs"},{"title":"Handle account transfer in your mobile app","description":"Catch account transfer conflicts on iOS and Android, and let users move a login method from an orphaned account to their currently authenticated account","href":"/recipes/mobile-account-transfer"},{"title":"Read auth state from a background process","href":"/recipes/swift/background-auth-state"},{"title":"Deeplinking Solana wallets in React Native applications","href":"/recipes/react-native/deeplinking-wallets"},{"title":null,"href":"/recipes/react-native/clearing-state-on-fresh-installs"},{"title":"Require MFA on every app session","href":"/recipes/react-native/mfa-on-app-session"},{"title":"OAuth with Capacitor","href":"/recipes/capacitor-oauth"}]},{"group":"Ecosystem","expanded":false,"pages":[{"title":null,"href":"/recipes/ecosystem/abstract-global-wallet"}]},{"group":"Integrations","expanded":false,"pages":[{"title":"Integrating the Base app","href":"/recipes/react/external-wallets/base-app"},{"sidebarTitle":"Base sub accounts","title":"Using Base sub accounts","href":"/recipes/react/external-wallets/base-sub-accounts"},{"title":"Integrating Base builder codes","href":"/recipes/evm/base-builder-codes"}]},{"group":"Tooling","expanded":false,"pages":[{"title":"Using the vanilla JavaScript SDK","href":"/recipes/core-js"},{"title":"Integrating Flashbots protect","href":"/recipes/flashbots-protect"},{"title":"Integrating with tRPC","href":"/recipes/trpc"},{"title":"Optimize your setup","href":"/recipes/dashboard/optimizing"}]},{"group":"Community written guides","expanded":false,"pages":[{"title":"Getting started with Privy and TON (Vite + React)","href":"/recipes/community/ton-vite-react"},{"title":"Swapping crypto using Privy and Omniston","href":"/recipes/community/ton-omniston-swap"}]}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Mobile SDK breadcrumbs - Privy Docs","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":[],"chunks":[]}