Skip to main content
API Reference SwiftyNsdk NsdkScanningSession

saveCurrentScan

Stops recording and asynchronously saves the recording to the configured path....

Declaration

func saveCurrentScan(timeout: Double = 10.0, pollingInterval: TimeInterval = 0.1) async throws -> SaveInfo

Summary

Stops recording and asynchronously saves the recording to the configured path.
Calling this function will stop the active recording, but stop must still be called
afterward to completely shut down this session.
- Parameters:
- timeout: The maximum duration in seconds to wait for the save operation
(default is 10 seconds).
- pollingInterval: The interval in seconds to wait between progress checks
(default is 0.1 seconds)
- Returns: Information about the saved scan, including it's id and file location.
- Throws:
- CancellationError if the Task running this function was cancelled.
- TimeoutError if the function timed out before it could complete execution.
- NsdkScanningSession.SaveError if there was an error specific to the
save operation.
- SeeAlso:
- stop
- configure(with:)


ON THIS PAGE