Skip to content

[bug] barcode-scanner, windowed: false, not working properly on IOS #3050

@Pmolmar

Description

@Pmolmar

When using the barcode-scanner in my iPhone 15 pro max (real device not emulated) with IOS 26.0.1 the scanner works properly, but the touch controls don't work after it's used (If I'm using windowed: true they work).

I'm using Svelte as the frontend and this is how I use the scan function, calling it from a button onclick.

<script lang="ts">
  import { scan, cancel, Format } from "@tauri-apps/plugin-barcode-scanner";
  let scanMsg = $state("");

  async function scanQR() {
      try {
          const result = await scan({
              formats: [Format.QRCode],
              windowed: false,
          });
          scanMsg = `Scanned: ${JSON.stringify(result.content)}`;
      } catch (err) {
          scanMsg = `error: ${err}`;
      } finally {
          await cancel();
      }
  }
</script>

<main class="container">
  <button onclick={scanQR}> Scan </button>
</main>

When the windowed attribute is set to true, it does work, but I want the native controls and don't want to implement transparency for the element in my app.

I've followed the steps to install the plugin as shown here

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions