One Logo Pool Ball
ProximityReader · IOS API REFERENCE

MobileDocumentReader

class · iOS 17.0+ · SDK 27.1

final class MobileDocumentReader

An object for configuring mobile document reading on the current device. After creating the `MobileDocumentReader` object, call ``prepare(using:)`` to prepare the device for mobile document reading. Use the returned ``MobileDocumentReaderSession`` object to read mobile documents. You can optionally display your brand's name and logo during a mobile document read. To do this, your server needs to generate a reader token, then pass the token as an argument to the ``prepare(using:)`` method.

Members (4)

get · iOS 17.0+

isSupported

TypeScript
static get isSupported(): boolean
Swift declaration
static var isSupported: Bool { get }

A Boolean value that indicates whether the device supports mobile document reading.

get · iOS 17.0+

configuration

TypeScript
get configuration(): Promise<MobileDocumentReader_Configuration>
Swift declaration
final var configuration: MobileDocumentReader.Configuration { get async throws }

The configuration of the mobile document reader. Use the information contained in the configuration to construct as reader token on your server. - Throws: A ``MobileDocumentReaderError`` if an error occurs.

method · iOS 17.0+

prepare

TypeScript
prepare(token?: (MobileDocumentReader_Token) | null): Promise<MobileDocumentReaderSession>
Swift declaration
final func prepare(using token: MobileDocumentReader.Token? = nil) async throws -> MobileDocumentReaderSession

Configures the device to read mobile documents. This method prepares the device for mobile document reading. This method returns a ``MobileDocumentReaderSession`` object, which you use to read mobile documents. After calling this method, there are three possible scenarios: - The method returns an existing ``MobileDocumentReaderSession`` immediately if that session is still valid. - The method retrieves and returns a new ``MobileDocumentReaderSession`` from the server. - This method throws a ``MobileDocumentReaderError`` if a problem occurs. - Parameters: - token: An optional reader token generated from your server. - Returns: ``MobileDocumentReaderSession`` when successful. - Throws: A ``MobileDocumentReaderError`` if the method fails to configure the device.

init · iOS 17.0+

init

TypeScript
static init(): MobileDocumentReader
Swift declaration
init()

Creates a mobile document reader.

Skipped declarations

No declarations were skipped in this snapshot.

All ProximityReader types →