Skip to content
SDK Demo IVA runtime panel showing environment flags, network status, and permissions

JavaScript SDK for Mobile Locker presentations

Call CRM, contacts, scanning, storage, analytics, and device APIs from inside a Mobile Locker presentation on iOS, Android, Electron, or CDN.

@mobilelocker/javascript-sdk is the official package for IVA and presentation developers. It talks to the Mobile Locker host so you do not hand-roll bridge HTTP for common platform capabilities.

The SDK initializes automatically. There is no init() call. At runtime, Mobile Locker injects authentication through the ?jwt= query parameter on the presentation URL.

Environment Host
iOS / iPadOS Mobile Locker iOS app
Android Mobile Locker Android app
Electron Mobile Locker Windows app
CDN CDN-hosted presentation

Outside a Mobile Locker environment (for example local development), most bridge calls are no-ops or return local fallbacks so you can still build the presentation.

Details: Environments.

Pick a path based on how you ship the presentation. Each card links to the full guide.

Install

Add @mobilelocker/javascript-sdk@2 to a bundled presentation, or load the UMD build when you do not use a bundler.

  • Package managers: npm or yarn
  • Node.js 18+ for installs and tooling
  • Mobile Locker host required for bridge APIs
  • iOS 5.5.0+ for contacts/CRM cursor list walks

Install guide →

Getting started

First success path after the package is available in your presentation.

  • No init() call; the SDK starts on load
  • Auth via the ?jwt= query parameter Mobile Locker injects
  • Call user.get() and handle MobileLockerError
  • Optional environment checks (isMobileLocker, isIOS, and related helpers)

Getting started →

UMD in HTML

For plain HTML/JS presentations that load scripts with tags instead of ESM imports.

  • Artifact: dist/index.umd.js
  • Global: mobilelocker (prefer mobilelocker.default || mobilelocker)
  • Same domains as the npm package once the script is loaded

UMD guide →

SDK Demo IVA

Interactive Visual Aid that exercises the SDK inside the Mobile Locker app (not as a standalone website).

  • Open the demo presentation in the Mobile Locker iOS app
  • Source and issues: github.com/mobilelocker/mobilelocker-sdk-demo
  • Pair screens with the domain guides for full API contracts

Demo guide →

Changelog

Release notes for @mobilelocker/javascript-sdk, including the 2.0 hard break from unbound contacts/CRM list dumps.

  • What changed between versions
  • Host version notes where documented
  • Migration pointers for removed 1.x list APIs

Changelog →

Browse by task in the domains overview, or jump straight to a module.