How to Upgrade
From v3.4.x to v3.6.x
Update the Package
-
Update the package to the new version:
dotnet add package Dynamsoft.MRZScannerBundle.Maui --version 3.6.2000 -
Raise the iOS minimum to 16.0, as required by the scanner’s Core ML models:
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">16.0</SupportedOSPlatformVersion>
The .NET 10 and .NET MAUI 10.0.20 requirements are unchanged.
If you also move to Xcode 27, your app must adopt the iOS UIScene lifecycle. See the note in Step 1 of the user guide.
Handle Behavior Changes
No public API was removed or renamed in 3.6.x, so existing code keeps compiling. These behavior changes can still affect it.
Results That Fail Check-Digit Validation Are Now Delivered
Through 3.4.x, the scanner discarded results that failed check-digit validation and kept scanning, so a damaged or altered document produced no result. 3.6.x returns the result and reports the failure per field:
using Dynamsoft.CodeParser.Maui;
if (result.Data?.GetFieldValidationStatus("documentNumber") == EnumValidationStatus.VS_FAILED)
{
// Accept the value, re-scan, or ask for a correction.
}
If your code assumed every result was check-digit-clean, add this check. See Reading a field’s validation status and GetFieldValidationStatus.
Camera Access Is Now Gated and Reported
Through 3.4.x, the scanner opened the camera without checking access, so a denied permission left the user on a blank preview. 3.6.x never opens the camera without access, and reports the denial as EnumResultStatus.Exception with CameraPermissionDenied (1001) or CameraPermissionRestricted (1002).
- Handle
Exception. Code that ignored it will now miss a denial the SDK reports. -
If your app already shows its own permission UI, turn off the scanner’s prompt so the user doesn’t see two:
config.IsCameraPermissionPromptEnabled = false;
See Handling Camera Permission.
The Scan Region Is Now the Guide Frame
Through 3.4.x, the whole camera preview was scanned, so a document outside the guide frame could still be read. 3.6.x scans only inside the frame. Hiding the frame restores the whole-preview behavior; see Hiding the guide frame.
Smaller Changes
- On iOS,
PersonalNumber,OptionalData1andOptionalData2are""instead ofnullwhen absent, matching Android. Check them withstring.IsNullOrEmpty. Startno longer changesTemplateFile. Through 3.4.x it could replace the property’s value with the template’s contents.- A
TemplateFilename that isn’t an app asset no longer throws. Through 3.4.x,StartthrewFileNotFoundException; now the value is passed to native as a file path, and a failure comes back as anExceptionresult. Startreports failures to open the scanner as anExceptionresult instead of never completing: on Android when there’s no activity, and on iOS when another page is still animating. See Starting the Scanner from a Modal Page.- A second
Startduring a scan returns the running scan’s task instead of opening another scanner.
Adopt the New APIs
These are additive, so adopting them is optional:
GetFieldValidationStatus— per-field check-digit status.EnumErrorCode— the bundle’s own error codes, both about camera access.IsCameraPermissionPromptEnabled— turns off the scanner’s permission prompt.MRZScannerConfig()— a parameterless constructor; setLicenseafterwards.
The scanner UI also gains a progress spinner and a flip prompt for two-sided ID cards, with no code needed. See The Scanner Screen.