Lectura de códigos QR de AEAT y TicketBAI en iOS con .NET MAUI

This article was translated from English: Does it need improvement?
Translated
View the article in English
Ios related to Lectura de códigos QR de AEAT y TicketBAI en iOS con .NET MAUI

Aplicaciones de campo en España: Los equipos de cuentas a pagar verifican facturas escaneando el código QR de AEAT (sede.agenciatributaria.gob.es) en iPhone/iPad. Los inspectores tributarios usan iOS para validar facturas VeriFactu in situ. Los equipos de campo farmacéutico de SILICIE escanean DataMatrix en envases de medicamentos. Los puntos de venta del País Vasco (Bizkaia, Gipuzkoa y Araba) leen los tíquets TicketBAI desde dispositivos Apple. El paquete BarCode.iOS de IronBarcode proporciona todas estas capacidades en una sola biblioteca .NET MAUI.

.NET MAUI (Interfaz de usuario de aplicaciones multiplataforma) se basa en Xamarin.Forms, proporcionando un marco unificado para desarrollar aplicaciones multiplataforma con .NET. Permite a los desarrolladores crear interfaces de usuario nativas que funcionan sin problemas en Android, iOS, macOS y Windows, agilizando el proceso de desarrollo de aplicaciones.

El paquete BarCode.iOS aporta soporte de código de barras a iOS.

Paquete IronBarcode para iOS

El paquete BarCode.iOS habilita funciones de códigos de barras en dispositivos iOS a través de proyectos multiplataforma .NET. No se necesita el paquete BarCode estándar.

Paquete de instalación BarCode.iOS
Biblioteca C# NuGet para PDF

Instalar con NuGet

Paquete de instalación BarCode.iOS

Crear un proyecto .NET MAUI

En la sección Multiplataforma, selecciona .NET MAUI App y continúa.

Crea proyecto de aplicación .NET MAUI

Incluir la biblioteca BarCode.iOS

La biblioteca se puede agregar de varias maneras. La más fácil es quizás usando NuGet.

  1. Dentro de Visual Studio, haz clic derecho en "Dependencies > NuGet" y selecciona "Manage NuGet Packages ...".
  2. Selecciona la pestaña "Browse" y busca "BarCode.iOS".
  3. Selecciona el paquete "BarCode.iOS" y haz clic en "Add Package".

Para evitar problemas con otras plataformas, modifica el archivo csproj para incluir el paquete solo al dirigirte a la plataforma iOS. Para hacerlo:

  1. Haz clic derecho en el archivo *.csproj de tu proyecto y selecciona "Editar archivo del proyecto".
  2. Crea un nuevo elemento ItemGroup de la siguiente manera:
<ItemGroup Condition="$(TargetFramework.Contains('ios')) == true">
    <PackageReference Include="BarCode.iOS" Version="2025.3.4" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.Contains('ios')) == true">
    <PackageReference Include="BarCode.iOS" Version="2025.3.4" />
</ItemGroup>
XML
  1. Mueve el PackageReference de "BarCode.iOS" dentro del ItemGroup que acabamos de crear.

Los pasos anteriores evitarán que el paquete "BarCode.iOS" se utilice en plataformas como Android. Para ese propósito, instala BarCode.Android en su lugar.

Diseñar la interfaz de la aplicación

Modifica el archivo XAML para aceptar valores de entrada para generar códigos de barras y QR. Además, incluye un botón para seleccionar un documento para leer un código de barras. Ejemplo:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="IronBarcodeMauiIOS.MainPage">

    <VerticalStackLayout Padding="20">
        <HorizontalStackLayout>
            <CheckBox x:Name="generatePdfCheckBox" IsChecked="{Binding IsGeneratePdfChecked}" />
            <Label Text="PDF (unchecked for PNG)" VerticalOptions="Center"/>
        </HorizontalStackLayout>

        <Entry x:Name="barcodeInput" Placeholder="Enter barcode value..." />
        <Button Text="Generate and save barcode" Clicked="WriteBarcode" />

        <Entry x:Name="qrInput" Placeholder="Enter QR code value..." />
        <Button Text="Generate and save QR code" Clicked="WriteQRcode" />

        <Button
        Text="Read Barcode"
        Clicked="ReadBarcode"
        Grid.Row="0"
        HorizontalOptions="Center"
        Margin="20, 20, 20, 10"/>
        <ScrollView
        Grid.Row="1"
        BackgroundColor="LightGray"
        Padding="10"
        Margin="10, 10, 10, 30">
            <Label x:Name="OutputText"/>
        </ScrollView>
    </VerticalStackLayout>

</ContentPage>
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="IronBarcodeMauiIOS.MainPage">

    <VerticalStackLayout Padding="20">
        <HorizontalStackLayout>
            <CheckBox x:Name="generatePdfCheckBox" IsChecked="{Binding IsGeneratePdfChecked}" />
            <Label Text="PDF (unchecked for PNG)" VerticalOptions="Center"/>
        </HorizontalStackLayout>

        <Entry x:Name="barcodeInput" Placeholder="Enter barcode value..." />
        <Button Text="Generate and save barcode" Clicked="WriteBarcode" />

        <Entry x:Name="qrInput" Placeholder="Enter QR code value..." />
        <Button Text="Generate and save QR code" Clicked="WriteQRcode" />

        <Button
        Text="Read Barcode"
        Clicked="ReadBarcode"
        Grid.Row="0"
        HorizontalOptions="Center"
        Margin="20, 20, 20, 10"/>
        <ScrollView
        Grid.Row="1"
        BackgroundColor="LightGray"
        Padding="10"
        Margin="10, 10, 10, 30">
            <Label x:Name="OutputText"/>
        </ScrollView>
    </VerticalStackLayout>

</ContentPage>
XML

Leer y escribir códigos de barras

Desde el código MainPage.xaml anterior, podemos ver que la casilla de verificación determina si el código de barras generado y el código QR debe estar en formato PDF. Configurar la clave de licencia. Por favor, usa una clave de licencia de prueba o de pago para este paso.

El código verifica y recupera el valor de la variable barcodeInput, luego utiliza el método CreateBarcode para generar el código de barras. Finalmente, llama al método SaveToDownloadsAsync, que guarda el archivo de manera adecuada tanto para Android como para iOS.

En iOS, se requiere una ruta de archivo personalizada para exportar el documento a la aplicación Archivos.

using IronBarCode;
namespace IronBarcodeMauiIOS;
public partial class MainPage : ContentPage
{
    public bool IsGeneratePdfChecked
    {
        get => generatePdfCheckBox.IsChecked;
        set
        {
            generatePdfCheckBox.IsChecked = value;
        }
    }
    public MainPage()
    {
        InitializeComponent();
        IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01";
    }

    // Method to generate and save a barcode
    private async void WriteBarcode(object sender, EventArgs e)
    {
        try
        {
            if (!string.IsNullOrEmpty(barcodeInput.Text))
            {
                var barcode = BarcodeWriter.CreateBarcode(barcodeInput.Text, BarcodeEncoding.EAN13);
                // Determine file extension based on checkbox state
                string fileExtension = IsGeneratePdfChecked ? "pdf" : "png";
                string fileName = $"Barcode_{DateTime.Now:yyyyMMddHHmmss}.{fileExtension}";
                byte[] fileData = IsGeneratePdfChecked ? barcode.ToPdfBinaryData() : barcode.ToPngBinaryData();
                // Save the file to the appropriate location
                await SaveToDownloadsAsync(fileData, fileName);
            }
        }
        catch (Exception ex)
        {
            // Log exceptions to debug output
            System.Diagnostics.Debug.WriteLine(ex);
        }
    }

    // Method to generate and save a QR code
    private async void WriteQRcode(object sender, EventArgs e)
    {
        try
        {
            if (!string.IsNullOrEmpty(qrInput.Text))
            {
                var barcode = QRCodeWriter.CreateQrCode(qrInput.Text);
                // Determine file extension based on checkbox state
                string fileExtension = IsGeneratePdfChecked ? "pdf" : "png";
                string fileName = $"QRcode_{DateTime.Now:yyyyMMddHHmmss}.{fileExtension}";
                byte[] fileData = IsGeneratePdfChecked ? barcode.ToPdfBinaryData() : barcode.ToPngBinaryData();
                // Save the file to the appropriate location
                await SaveToDownloadsAsync(fileData, fileName);
            }
        }
        catch (Exception ex)
        {
            // Log exceptions to debug output
            System.Diagnostics.Debug.WriteLine(ex);
        }
    }

    // Method to read a barcode from a file
    private async void ReadBarcode(object sender, EventArgs e)
    {
        try
        {
            var options = new PickOptions
            {
                PickerTitle = "Please select a file"
            };
            var file = await FilePicker.PickAsync(options);
            OutputText.Text = "";
            if (file != null)
            {
                using var stream = await file.OpenReadAsync();
                BarcodeResults result;
                // Determine if the document is a PDF or an image
                if (file.ContentType.Contains("pdf"))
                {
                    result = BarcodeReader.ReadPdf(stream);
                }
                else
                {
                    result = BarcodeReader.Read(stream);
                }
                // Display the results
                string barcodeResult = "";
                int count = 1;
                result.ForEach(x => { barcodeResult += $"barcode {count}: {x.Value}\n"; count++; });
                OutputText.Text = barcodeResult;
            }
        }
        catch (Exception ex)
        {
            // Log exceptions to debug output
            System.Diagnostics.Debug.WriteLine(ex);
        }
    }

    // Method to save file data to the Downloads folder (or Documents on iOS)
    public async Task SaveToDownloadsAsync(byte[] fileData, string fileName)
    {
        // #if IOS
        // Define the custom path you want to save to
        var customPath = "/Users/Iron/Library/Developer/CoreSimulator/Devices/7D1F57F2-1103-46DA-AEE7-C8FC871502F5/data/Containers/Shared/AppGroup/37CD82C0-FCFC-45C7-94BB-FFEEF7BAFF13/File Provider Storage/Document";
        // Combine the custom path with the file name
        var filePath = Path.Combine(customPath, fileName);
        try
        {
            // Create the directory if it doesn't exist
            if (!Directory.Exists(customPath))
            {
                Directory.CreateDirectory(customPath);
            }
            // Save the file to the specified path
            await File.WriteAllBytesAsync(filePath, fileData);
            // Display a success message
            await Application.Current.MainPage.DisplayAlert("Saved", $"File saved to {filePath}", "OK");
        }
        catch (Exception ex)
        {
            System.Diagnostics.Debug.WriteLine("Error saving file: " + ex.Message);
        }
        // #endif
    }
}
using IronBarCode;
namespace IronBarcodeMauiIOS;
public partial class MainPage : ContentPage
{
    public bool IsGeneratePdfChecked
    {
        get => generatePdfCheckBox.IsChecked;
        set
        {
            generatePdfCheckBox.IsChecked = value;
        }
    }
    public MainPage()
    {
        InitializeComponent();
        IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01";
    }

    // Method to generate and save a barcode
    private async void WriteBarcode(object sender, EventArgs e)
    {
        try
        {
            if (!string.IsNullOrEmpty(barcodeInput.Text))
            {
                var barcode = BarcodeWriter.CreateBarcode(barcodeInput.Text, BarcodeEncoding.EAN13);
                // Determine file extension based on checkbox state
                string fileExtension = IsGeneratePdfChecked ? "pdf" : "png";
                string fileName = $"Barcode_{DateTime.Now:yyyyMMddHHmmss}.{fileExtension}";
                byte[] fileData = IsGeneratePdfChecked ? barcode.ToPdfBinaryData() : barcode.ToPngBinaryData();
                // Save the file to the appropriate location
                await SaveToDownloadsAsync(fileData, fileName);
            }
        }
        catch (Exception ex)
        {
            // Log exceptions to debug output
            System.Diagnostics.Debug.WriteLine(ex);
        }
    }

    // Method to generate and save a QR code
    private async void WriteQRcode(object sender, EventArgs e)
    {
        try
        {
            if (!string.IsNullOrEmpty(qrInput.Text))
            {
                var barcode = QRCodeWriter.CreateQrCode(qrInput.Text);
                // Determine file extension based on checkbox state
                string fileExtension = IsGeneratePdfChecked ? "pdf" : "png";
                string fileName = $"QRcode_{DateTime.Now:yyyyMMddHHmmss}.{fileExtension}";
                byte[] fileData = IsGeneratePdfChecked ? barcode.ToPdfBinaryData() : barcode.ToPngBinaryData();
                // Save the file to the appropriate location
                await SaveToDownloadsAsync(fileData, fileName);
            }
        }
        catch (Exception ex)
        {
            // Log exceptions to debug output
            System.Diagnostics.Debug.WriteLine(ex);
        }
    }

    // Method to read a barcode from a file
    private async void ReadBarcode(object sender, EventArgs e)
    {
        try
        {
            var options = new PickOptions
            {
                PickerTitle = "Please select a file"
            };
            var file = await FilePicker.PickAsync(options);
            OutputText.Text = "";
            if (file != null)
            {
                using var stream = await file.OpenReadAsync();
                BarcodeResults result;
                // Determine if the document is a PDF or an image
                if (file.ContentType.Contains("pdf"))
                {
                    result = BarcodeReader.ReadPdf(stream);
                }
                else
                {
                    result = BarcodeReader.Read(stream);
                }
                // Display the results
                string barcodeResult = "";
                int count = 1;
                result.ForEach(x => { barcodeResult += $"barcode {count}: {x.Value}\n"; count++; });
                OutputText.Text = barcodeResult;
            }
        }
        catch (Exception ex)
        {
            // Log exceptions to debug output
            System.Diagnostics.Debug.WriteLine(ex);
        }
    }

    // Method to save file data to the Downloads folder (or Documents on iOS)
    public async Task SaveToDownloadsAsync(byte[] fileData, string fileName)
    {
        // #if IOS
        // Define the custom path you want to save to
        var customPath = "/Users/Iron/Library/Developer/CoreSimulator/Devices/7D1F57F2-1103-46DA-AEE7-C8FC871502F5/data/Containers/Shared/AppGroup/37CD82C0-FCFC-45C7-94BB-FFEEF7BAFF13/File Provider Storage/Document";
        // Combine the custom path with the file name
        var filePath = Path.Combine(customPath, fileName);
        try
        {
            // Create the directory if it doesn't exist
            if (!Directory.Exists(customPath))
            {
                Directory.CreateDirectory(customPath);
            }
            // Save the file to the specified path
            await File.WriteAllBytesAsync(filePath, fileData);
            // Display a success message
            await Application.Current.MainPage.DisplayAlert("Saved", $"File saved to {filePath}", "OK");
        }
        catch (Exception ex)
        {
            System.Diagnostics.Debug.WriteLine("Error saving file: " + ex.Message);
        }
        // #endif
    }
}
Imports Microsoft.VisualBasic
Imports IronBarCode
Namespace IronBarcodeMauiIOS
	Partial Public Class MainPage
		Inherits ContentPage

		Public Property IsGeneratePdfChecked() As Boolean
			Get
				Return generatePdfCheckBox.IsChecked
			End Get
			Set(ByVal value As Boolean)
				generatePdfCheckBox.IsChecked = value
			End Set
		End Property
		Public Sub New()
			InitializeComponent()
			IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01"
		End Sub

		' Method to generate and save a barcode
		Private Async Sub WriteBarcode(ByVal sender As Object, ByVal e As EventArgs)
			Try
				If Not String.IsNullOrEmpty(barcodeInput.Text) Then
					Dim barcode = BarcodeWriter.CreateBarcode(barcodeInput.Text, BarcodeEncoding.EAN13)
					' Determine file extension based on checkbox state
					Dim fileExtension As String = If(IsGeneratePdfChecked, "pdf", "png")
					Dim fileName As String = $"Barcode_{DateTime.Now:yyyyMMddHHmmss}.{fileExtension}"
					Dim fileData() As Byte = If(IsGeneratePdfChecked, barcode.ToPdfBinaryData(), barcode.ToPngBinaryData())
					' Save the file to the appropriate location
					Await SaveToDownloadsAsync(fileData, fileName)
				End If
			Catch ex As Exception
				' Log exceptions to debug output
				System.Diagnostics.Debug.WriteLine(ex)
			End Try
		End Sub

		' Method to generate and save a QR code
		Private Async Sub WriteQRcode(ByVal sender As Object, ByVal e As EventArgs)
			Try
				If Not String.IsNullOrEmpty(qrInput.Text) Then
					Dim barcode = QRCodeWriter.CreateQrCode(qrInput.Text)
					' Determine file extension based on checkbox state
					Dim fileExtension As String = If(IsGeneratePdfChecked, "pdf", "png")
					Dim fileName As String = $"QRcode_{DateTime.Now:yyyyMMddHHmmss}.{fileExtension}"
					Dim fileData() As Byte = If(IsGeneratePdfChecked, barcode.ToPdfBinaryData(), barcode.ToPngBinaryData())
					' Save the file to the appropriate location
					Await SaveToDownloadsAsync(fileData, fileName)
				End If
			Catch ex As Exception
				' Log exceptions to debug output
				System.Diagnostics.Debug.WriteLine(ex)
			End Try
		End Sub

		' Method to read a barcode from a file
		Private Async Sub ReadBarcode(ByVal sender As Object, ByVal e As EventArgs)
			Try
				Dim options = New PickOptions With {.PickerTitle = "Please select a file"}
				Dim file = Await FilePicker.PickAsync(options)
				OutputText.Text = ""
				If file IsNot Nothing Then
					Dim stream = Await file.OpenReadAsync()
					Dim result As BarcodeResults
					' Determine if the document is a PDF or an image
					If file.ContentType.Contains("pdf") Then
						result = BarcodeReader.ReadPdf(stream)
					Else
						result = BarcodeReader.Read(stream)
					End If
					' Display the results
					Dim barcodeResult As String = ""
					Dim count As Integer = 1
					result.ForEach(Sub(x)
						barcodeResult &= $"barcode {count}: {x.Value}" & vbLf
						count += 1
					End Sub)
					OutputText.Text = barcodeResult
				End If
			Catch ex As Exception
				' Log exceptions to debug output
				System.Diagnostics.Debug.WriteLine(ex)
			End Try
		End Sub

		' Method to save file data to the Downloads folder (or Documents on iOS)
		Public Async Function SaveToDownloadsAsync(ByVal fileData() As Byte, ByVal fileName As String) As Task
			' #if IOS
			' Define the custom path you want to save to
			Dim customPath = "/Users/Iron/Library/Developer/CoreSimulator/Devices/7D1F57F2-1103-46DA-AEE7-C8FC871502F5/data/Containers/Shared/AppGroup/37CD82C0-FCFC-45C7-94BB-FFEEF7BAFF13/File Provider Storage/Document"
			' Combine the custom path with the file name
			Dim filePath = Path.Combine(customPath, fileName)
			Try
				' Create the directory if it doesn't exist
				If Not Directory.Exists(customPath) Then
					Directory.CreateDirectory(customPath)
				End If
				' Save the file to the specified path
				Await File.WriteAllBytesAsync(filePath, fileData)
				' Display a success message
				Await Application.Current.MainPage.DisplayAlert("Saved", $"File saved to {filePath}", "OK")
			Catch ex As Exception
				System.Diagnostics.Debug.WriteLine("Error saving file: " & ex.Message)
			End Try
			' #endif
		End Function
	End Class
End Namespace
$vbLabelText   $csharpLabel

Por último, cambia el objetivo de compilación a iOS Simulator y ejecuta el proyecto.

Ejecutar el proyecto

Esto te mostrará cómo ejecutar el proyecto y usar la función de código de barras.

Execute .NET MAUI App project

Descargar proyecto de aplicación .NET MAUI

Puede descargar el código completo de esta guía. Viene como un archivo comprimido que puede abrir en Visual Studio como un proyecto de aplicación .NET MAUI.

Haz clic aquí para descargar el proyecto.

Casos de uso en el mercado español con iOS e IronBarcode

La aplicación .NET MAUI para iOS cubre los principales flujos de trabajo de campo en España:

Verificación de facturas VeriFactu: El equipo financiero usa iPhone/iPad para escanear el código QR de facturas recibidas, decodificar la URL de la AEAT e iniciar la consulta al servicio de verificación de sede.agenciatributaria.gob.es. El método BarcodeReader.Read(stream) procesa la imagen capturada por la cámara del dispositivo y devuelve la URL completa con los parámetros nif, numserie, fecha, importe y huella del registro VeriFactu.

TicketBAI en puntos de venta vascos: Los establecimientos de Bizkaia, Gipuzkoa y Araba que operan con TPV en iPad leen los tíquets emitidos para verificar el hash TicketBAI ante la Diputación Foral. El método ReadBarcode del ejemplo anterior puede adaptarse para enviar el valor decodificado al endpoint de validación del territorio histórico correspondiente.

SILICIE y trazabilidad farmacéutica: Los visitadores médicos y auditores del Ministerio de Sanidad utilizan iPad para escanear los códigos DataMatrix de los envases de medicamentos sujetos al sistema SILICIE. IronBarcode detecta automáticamente el formato DataMatrix gracias a la detección automática de BarcodeEncoding.All, sin necesidad de configuración adicional.

Generación de EAN-13 en campo: Los agentes comerciales de distribuidores registrados en GS1 España pueden generar etiquetas EAN-13 con BarcodeWriter.CreateBarcode(value, BarcodeEncoding.EAN13) desde el iPad y enviarlas por correo electrónico o guardarlas en la app Archivos de iOS para impresión posterior.

Para validar la licencia de IronBarcode en producción, establezca IronBarCode.License.LicenseKey en el constructor de MainPage antes del primer escaneo.

Preguntas Frecuentes

¿Cómo puedo crear y escanear códigos de barras en iOS usando C#?

Puede usar .NET MAUI con el paquete BarCode.iOS para crear y escanear códigos de barras en iOS. Instale el paquete a través de NuGet, configure su proyecto y use los métodos proporcionados para generar y leer códigos de barras.

¿Cuáles son los requisitos previos para construir una aplicación de escaneo de códigos de barras en .NET MAUI?

Asegúrese de tener instalado Visual Studio con soporte for .NET MAUI y acceso al paquete BarCode.iOS a través de NuGet. La configuración incluirá modificar XAML para la interfaz de usuario y C# para el manejo del código de barras.

¿Cómo modificar XAML para escaneo de códigos en .NET MAUI?

En el archivo XAML, incluya campos de entrada para los valores de los códigos de barras, botones para las operaciones de código de barras y etiquetas para mostrar los resultados, utilizando VerticalStackLayout y HorizontalStackLayout para el diseño.

¿Qué método debo usar para generar un código de barras en una aplicación .NET MAUI?

Use el método WriteBarcode en la clase MainPage para generar códigos de barras, utilizando la clase BarcodeWriter y guardando archivos con SaveToDownloadsAsync.

¿Cómo puedo solucionar problemas si el código de barras no está siendo reconocido en mi aplicación?

Asegúrese de que el archivo de código de barras esté correctamente seleccionado y sea legible. Use el método ReadBarcode para seleccionar y decodificar el código de barras, verificando las rutas y formatos de archivo correctos.

¿Cuál es el propósito de establecer una clave de licencia en la aplicación de código de barras?

Establecer una clave de licencia en su aplicación asegura que tiene la funcionalidad completa de la biblioteca de códigos de barras sin limitaciones, lo cual es crucial para los entornos de producción.

¿Cómo puedo guardar un código de barras generado como PDF o PNG?

Utilice la propiedad IsGeneratePdfChecked para determinar el formato de salida. Si está marcada, los códigos de barras se guardan como PDFs; de lo contrario, se guardan como imágenes PNG.

¿Cuál es el proceso para ejecutar un proyecto de código de barras .NET MAUI en un simulador de iOS?

Después de configurar su proyecto, seleccione el simulador de iOS como destino de despliegue en Visual Studio y ejecute el proyecto para probar la funcionalidad de código de barras en el entorno simulado.

¿Cómo puedo descargar un proyecto de muestra para el escaneo de códigos de barras en .NET MAUI?

Un proyecto de muestra completo está disponible para descargar como un archivo comprimido, que se puede abrir en Visual Studio para explorar los detalles de la implementación del escaneo de códigos de barras en iOS.

¿Puede IronBarcode en iOS leer el código QR de AEAT de facturas españolas para cumplir con VeriFactu?

Sí. Con el paquete BarCode.iOS en una app .NET MAUI, los usuarios de iPhone/iPad pueden fotografiar una factura, y BarcodeReader.Read(stream) decodifica el código QR de AEAT extrayendo la URL con los parámetros nif, numserie, fecha, importe y huella requeridos por el régimen VeriFactu.

¿IronBarcode para iOS soporta la lectura de DataMatrix para el sistema SILICIE de farmacias?

Sí. IronBarcode detecta automáticamente el formato DataMatrix usado en el etiquetado de medicamentos del sistema SILICIE (Ministerio de Sanidad de España). Los farmacéuticos y auditores pueden usar iPad con la app .NET MAUI para escanear los envases y registrar los movimientos de trazabilidad.

Curtis Chau
Escritor Técnico

Curtis Chau tiene una licenciatura en Ciencias de la Computación (Carleton University) y se especializa en el desarrollo front-end con experiencia en Node.js, TypeScript, JavaScript y React. Apasionado por crear interfaces de usuario intuitivas y estéticamente agradables, disfruta trabajando con frameworks modernos y creando manuales bien ...

Leer más
¿Listo para empezar?
Nuget Descargas 2,240,258 | Versión: 2026.5 just released
Still Scrolling Icon

¿Aún desplazándote?

¿Quieres una prueba rápida? PM > Install-Package BarCode
ejecuta una muestra observa cómo tu cadena se convierte en un código de barras.