RoomioError.Code
The kind of failure. New codes may be added in future releases, so include a default case when you switch over codes.
struct Code
captureFailed
The scan failed while recording.
static let captureFailed: RoomioError.Code
Discussion
If severity is RoomioError.Severity.recoverable, the scan continues and no action is needed. If it is RoomioError.Severity.fatal, the scan is lost: close the session and offer a new scan. Include message and underlying when reporting the problem.
connectionRequired
The app hasn’t been online since it was installed or updated, so scanning isn’t set up yet.
static let connectionRequired: RoomioError.Code
Discussion
The first scan after an install or update needs a connection; after that, scanning works offline. isRetryable is true: ask the user to connect, then try again.
deviceNotSupported
This device cannot scan.
static let deviceNotSupported: RoomioError.Code
Discussion
There is no fix on this device. Call isSupported() before offering a scan, and hide the option where it returns RoomioSupport.unsupported.
exportFailed
The finished scan could not be packaged.
static let exportFailed: RoomioError.Code
Discussion
The scan is kept. If isRetryable is true, call export() again. If it keeps failing, or isRetryable is false, the scan cannot be exported; include message when reporting the problem.
init(rawValue:)
Create a code from its string value.
init(rawValue: String)
insufficientStorage
The device is too low on storage, so the scan didn’t start. The severity is RoomioError.Severity.recoverable. The scan view shows a sheet asking the user to free space, and closing it cancels the session. Running low during a scan doesn’t stop the scan.
static let insufficientStorage: RoomioError.Code
Discussion
Ask the user to free some space, then start a scan.
lowBattery
The battery is too low to finish a scan, so it didn’t start.
static let lowBattery: RoomioError.Code
Discussion
The severity is RoomioError.Severity.recoverable. The scan view shows a sheet asking the user to charge the device, and closing it cancels the session; start a new scan once it has charged. A battery running low during a scan doesn’t stop the scan.
notConfigured
configure(publishableKey:) has not been called.
static let notConfigured: RoomioError.Code
Discussion
Call configure(publishableKey:) with your publishable key at app launch, before any other SDK method.
notReady
stop() was called in the first few seconds of a scan.
static let notReady: RoomioError.Code
permissionDenied
The user declined camera access.
static let permissionDenied: RoomioError.Code
Discussion
The SDK asks for camera access when the camera first starts, and does not ask again once the user declines. Instead RoomioScanView asks the user to allow it in Settings, and this error is recoverable: the scan carries on once access is allowed, and Cancel cancels the session.
If isRetryable is false, your app’s Info.plist is missing NSCameraUsageDescription, and the error is fatal. Add it.
powerSaving
Low Power Mode (iOS) or Battery Saver (Android) is on, so the scan didn’t start.
static let powerSaving: RoomioError.Code
Discussion
The severity is RoomioError.Severity.recoverable. The scan view shows a sheet asking the user to turn it off, and closing it cancels the session; start a new scan once it is off. Turning it on during a scan doesn’t stop the scan.
publishableKeyRejected
Roomio didn’t accept the key passed to configure(publishableKey:).
static let publishableKeyRejected: RoomioError.Code
Discussion
Copy the publishable key again from the Roomio portal. It starts with roomio_pub_live_.
rawValue
The code as a string, for example "permission_denied".
let rawValue: String
sdkUpdateRequired
This version of the Roomio SDK is no longer supported, so it can’t scan.
static let sdkUpdateRequired: RoomioError.Code
Discussion
Update the SDK in your app to the latest release, and ask your users to update the app.
sessionUnavailable
The camera or AR system could not run.
static let sessionUnavailable: RoomioError.Code
Discussion
Close the session. If isRetryable is true, the cause is usually temporary, such as another app using the camera: ask the user to try again, then start a new scan.