Using ProGuard with the .NET MAUI Barcode Scanner SDK
If you have ProGuard/R8 enabled for the release/production build, add the following rules:
-keep public enum io.scanbot.sdk.barcode.entity.MSIPlesseyChecksumAlgorithm { *; }
-keep public enum io.scanbot.sdk.core.contourdetector.DetectionResult { *; }
-keep public enum io.scanbot.sdk.core.contourdetector.DetectionStatus { *; }
-keep public enum io.scanbot.check.model.CheckRecognizerStatus { *; }
-keep public enum io.scanbot.sdk.core.payformscanner.model.TokenType { *; }
-keep public enum io.scanbot.sdk.tiff.model.TIFFImageWriterCompressionOptions { *; }
-keep public enum io.scanbot.sdk.process.ImageFilterType { *; }
-keep public class io.scanbot.idcardscanner.IdScanResult { *; }
-keep class io.scanbot.genericdocument.entity.CommonFieldType { *; }
-keep class io.scanbot.genericdocument.entity.** { *; }
-keep class io.scanbot.genericdocument.** { *; }
-keep class androidx.appcompat.widget.FitWindowsLinearLayout { *; }
-keep class androidx.appcompat.widget.** { *; }
-keep class io.scanbot.barcodescanner.model.aamva.AAMVADocumentSubfile { *; }
-keep class io.scanbot.barcodescanner.model.** { *; }
-keep class io.scanbot.check.model.Result.** { *; }
-keep class io.scanbot.check.model.Result { *; }
-keep class io.scanbot.check.model.** { *; }
-keepattributes EnclosingMethod
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes *Annotation*
-dontwarn sun.misc.**
-keep class com.google.gson.stream.** { *; }
-keep class * implements com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get free trial licenseScanbot SDK is part of the Apryse SDK product family
A mobile scan is just the start. With Apryse SDKs, you can expand mobile workflows into full cross‑platform document processing. Whether you need to edit PDFs, add secure digital signatures, or use a fast, customizable document viewer and editor, Apryse gives you the tools to build powerful features quickly.
Learn more
