Swift
Error Reporting
You can report problems encountered during on-device OCR extraction using built-in reporting functions. These reports are sent automatically if the device has an internet connection. If not, the SDK will store the report and post it once connectivity is restored.
๐งพ Reporting an Issue Manually
To report an issue manually from the on-device OCR process, use the following method:
๐ Parameters:
apiKey
/token
: Required for authentication. Either one must be provided.modelClass
: The model type where the error occurred (e.g.,.shippingLabel
,.itemLabels
,.billOfLading
).modelSize
: The size of the model being used. Supported sizes:.micro
,.large
.image
: (Optional) The image that was used during the scan, passed as aCIImage
.reportText
: A clear description of the issue you're facing.response
: (Optional) The response object (if any) received from the on-device scan.reportModel
: (Optional) A custom object to provide structured metadata about the report.completion
: A block returning anInt
to indicate the result of the error report:1
โ Error reported successfully2
โ Error saved for automatic submission later
This method should be called using the shared instance:
๐ Retrieving SDK Logs
To assist with debugging or support, you can also retrieve the internal SDK logs using:
This method returns a URL
pointing to a ZIP file that contains SDK usage logs. These logs do not include any user-related or sensitive information and are intended for error tracking purposes only.
Example usage:
You can upload this ZIP file to your bug report system or share it with the PackageX support team for deeper investigation.