Mobile SDKs

Integrate seamlessly into iOS and Android apps

zerohash publishes native SDKs that present our flows inside your own app. Each SDK renders the zerohash mobile web app in a hardened WebView and bridges it to a typed native API, so you write ordinary Swift, Kotlin or TypeScript and never touch a WebView yourself.

Choose your platform

PlatformPackageGuide
iOSSwift Package ManageriOS SDK
AndroidMaven CentralAndroid SDK
CapacitornpmCapacitor plugin

Flows

Three flows are available on every platform.

FlowWhat the user does
FundDeposits into their account, either manually, via Pay, or by connecting an external account
Crypto WithdrawalsWithdraws crypto to an external address, with no conversion
Fund WithdrawalsWithdraws to a linked destination, converting fiat to crypto on the way out

The integration shape

Every flow on every platform follows the same three steps.

  1. Configure - Pass the JWT, the environment, the theme, and your event handlers. You get back a session object.
  2. Present - Show the flow. On iOS and Android it is presented from your view controller or activity; in Capacitor it is a single plugin call.
  3. Handle events - Your handlers fire as the flow progresses, and again when it reaches a terminal state.

Only one session can be presented at a time. Each session is single-use: configure a new one for the next flow rather than re-presenting a closed one.

Events mirror the web SDK

If you already integrate a zerohash web SDK, the native handlers should be fammiliar. The native SDKs deliberately keep the web handler names.

Web SDKiOSAndroidCapacitor event
onLoadedonLoadedonLoadedloaded
onCloseonCloseonCloseclose
onErroronErroronErrorerror
onEventonEventonEventevent
onCompletedonCompletedonCompletedfundCompleted, withdrawalCompleted, fundWithdrawalCompleted
onFailedonFailedonFailedfundFailed, withdrawalFailed
onDepositonDepositonDepositfundDeposit

Capacitor is the one exception, and only for the events whose payload differs per flow. Its events are global to the plugin rather than scoped to a session object, so a bare completed would force every listener to work out which flow it came from before reading a field. Events whose payload is identical across flows stay bare: loaded, close, error and event. For more details, check each SDK README.

Versioning

The SDKs follow semantic versioning. A major version means a breaking API change, a minor adds backwards-compatible functionality, and a patch is a backwards-compatible fix. Pin to a major version and take minors and patches automatically; each platform guide shows how.

Full examples

Each platform guide covers requirements, installation and a minimal
integration. Complete per-flow examples, the full event payload reference, and
error type listings live in the SDK README, which is versioned with the code:


Did this page help you?