Skip to content

presentation

const presentation: {
get: Promise<Presentation>;
getEvents: Promise<unknown[]>;
getDeviceEvents: Promise<unknown[]>;
reload: void;
close: void;
getAll: Promise<Presentation[]>;
getByID: Promise<Presentation>;
getByName: Promise<Presentation>;
refresh: Promise<Presentation[]>;
download: Promise<DownloadResult>;
openByID: void;
openByExternalID: Promise<void>;
openByName: Promise<void>;
openPicker: void;
};

Defined in: domains/presentation.ts:14

get(): Promise<Presentation>;

Get the presentation that is currently open.

Promise<Presentation>

The current Presentation.

MobileLockerError on network failure or server error.

getEvents(): Promise<unknown[]>;

Get the analytics events recorded for the current presentation session.

Promise<unknown[]>

Array of raw event objects.

MobileLockerError on network failure or server error.

getDeviceEvents(): Promise<unknown[]>;

Alias for getEvents.

Promise<unknown[]>

Array of raw event objects.

reload(): void;

Reload the current presentation’s web content.

Triggers a full page reload inside the presentation webview.

void

close(): void;

Close the current presentation and return to the app home screen.

Prefers the dedicated host route POST /mobilelocker/api/close-presentation (documented in the iOS web-server API). Falls back to the legacy method=close-presentation analytics POST used by older app builds.

void

getAll(): Promise<Presentation[]>;

Get all presentations available to the current user.

Promise<Presentation[]>

Array of Presentation objects.

MobileLockerError on network failure or server error.

getByID(id): Promise<Presentation>;

Get a presentation by its numeric ID.

Parameter Type Description
id number The presentation ID.

Promise<Presentation>

The matching Presentation.

MobileLockerError on network failure, or if not found.

getByName(name): Promise<Presentation>;

Get a presentation by its name.

Parameter Type Description
name string The presentation name (case-sensitive).

Promise<Presentation>

The matching Presentation.

MobileLockerError on network failure, or if not found.

refresh(): Promise<Presentation[]>;

Refresh the list of available presentations from the server.

Promise<Presentation[]>

Updated array of Presentation objects.

MobileLockerError on network failure or server error.

download(id): Promise<DownloadResult>;

Queue a presentation for download to the device.

Parameter Type Description
id number The numeric ID of the presentation to download.

Promise<DownloadResult>

An object with status: 'queued', 'already_installed', 'not_available', or 'not_permitted'.

MobileLockerError on network failure or server error.

openByID(id): void;

Open a presentation by its numeric ID.

In the iOS app, triggers native presentation navigation via the app bridge. In a browser, opens the presentation in a new tab using the platform web URL.

Parameter Type Description
id number The numeric ID of the presentation to open.

void

mobilelocker.presentation.openByID(42)
openByExternalID(externalID): Promise<void>;

Open a presentation by its external CRM ID.

In the iOS app, triggers native presentation navigation via the app bridge. In a browser, fetches all presentations, finds the match by external ID, then opens it.

Parameter Type Description
externalID string The external identifier for the presentation (e.g. a Salesforce ID).

Promise<void>

MobileLockerError if no presentation with the given external ID is found.

await mobilelocker.presentation.openByExternalID('a0B1234567890')
openByName(name): Promise<void>;

Open a presentation by its name.

In the iOS app, triggers native presentation navigation via the app bridge. In a browser, fetches all presentations, finds the match by name, then opens it.

Parameter Type Description
name string The presentation name (case-sensitive).

Promise<void>

MobileLockerError if no presentation with the given name is found.

await mobilelocker.presentation.openByName('Kazaamax Rebate Calculator Demo');
openPicker(): void;

Open the native presentation picker so the user can choose a presentation to open.

void

iOS app only. Throws in all other environments.

MobileLockerError if called outside the iOS app.