Skip to content

scanner

const scanner: {
scanBusinessCard: Promise<ScanResult>;
scanBadge: Promise<ScanResult>;
};

Defined in: domains/scanner.ts:27

scanBusinessCard(eventID?): Promise<ScanResult>;

Open the native business card scanner and capture a contact.

Parameter Type Description
eventID? number Optional lead retrieval event ID to associate the scan with.

Promise<ScanResult>

A ScanResult — check isSuccess before accessing businessCard.

iOS app only. Throws in all other environments. Long-lived host bridge: per-request timeout: 0, no automatic retry.

MobileLockerError if called outside the iOS app.

const result = await mobilelocker.scanner.scanBusinessCard()
if (result.isSuccess) console.log(result.businessCard)
scanBadge(eventID): Promise<ScanResult>;

Open the native badge scanner and capture an event attendee.

Parameter Type Description
eventID number The lead retrieval event ID to associate the scan with.

Promise<ScanResult>

A ScanResult — check isSuccess before accessing attendee.

iOS app only. Throws in all other environments. Long-lived host bridge: per-request timeout: 0, no automatic retry.

MobileLockerError if called outside the iOS app.

const result = await mobilelocker.scanner.scanBadge(eventID)
if (result.isSuccess) console.log(result.attendee)