Displaying on iOS
Overview
In this use case, in addition to capturing and uploading the images, an Edit Metadata screen is shown to the user while the documents are uploaded and processed.
Implementation
There’s no change in Capture Flow implementation, except for coordinatorDidFinishCapture
event of the CaptureFlowCoordinatorDelegate
: this is where the Edit Metadata UI is instantiated:
You can use all the features and methods, described on Launch UI on iOS page.
IMPORTANT:
But you must provide a.metadataEdit
as anavitationIntent
argument, withlocalIds
set toCaptureFlow.ProcessingInfo.sourceIds
.
Example
func coordinatorDidFinishCapture(
_ coordinator: Sensibill.CaptureFlow.Coordinator,
result: CaptureFlow.ProcessingInfo
) {
displayEditMetadataScreen(result.sourceIds)
}
func displayEditMetadataScreen(_ sourceIds: [String]) {
// This fucntion must run on main thread
guard Thread.isMainThread else {
DispatchQueue.main.async {
self.displayEditMetadataScreen(sourceIds)
}
return
}
// Start UI
SensibillSDK.shared.smui.start(
modalOver: self,
navigationIntent: .metadataEdit(localIds: sourceIds) // IMPORTANT!
)
}