npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@noemec/react-native-qr-camera

v0.2.1

Published

Ultra-light QR camera for React Native (open camera, read QR, emit value).

Readme

@noemec/react-native-qr-camera

Ultra-ligera cámara para abrir la cámara, leer un QR y emitir su valor. Sin estilos, con control de flash y manejo de sesión correcto.

Estado actual

  • Android: Preview (Camera2) + flash + lectura de QR (ZXing). Probado y funcionando.
  • iOS: Preview + lectura de QR (AVFoundation) + flash + teardown correcto. Probado en iPhone 13.

Instalación

  1. Instala el paquete en tu app:
npm i @noemec/react-native-qr-camera
  1. iOS: instala pods en tu app:
cd ios && pod install && cd ..
  1. Autolinking de RN hace el resto.

  2. Android: Dependemos de ZXing core desde Maven (com.google.zxing:core) para la decodificación QR.

  3. iOS: añade la clave de privacidad de la cámara (NSCameraUsageDescription) en tu app.

Con Xcode:

  • Abre ios/<TuProyecto>.xcworkspace.
  • Selecciona tu target de la app → pestaña Info.
  • En “Custom iOS Target Properties”, pulsa “+” y agrega:
    • Key: NSCameraUsageDescription
    • Type: String
    • Value: La app necesita acceso a la cámara para escanear códigos QR.

O editando el Info.plist directamente:

<key>NSCameraUsageDescription</key>
<string>La app necesita acceso a la cámara para escanear códigos QR.</string>

Permisos

  • iOS: añade NSCameraUsageDescription en Info.plist (ver pasos arriba). No se requiere micrófono.
  • Android: la app debe solicitar android.permission.CAMERA antes de montar el componente.

API

import { QRScannerView } from '@noemec/react-native-qr-camera'

<QRScannerView
  style={{ flex: 1 }}
  active={true}
  torchOn={false}
  onCodeScanned={(value) => {
    // valor del QR
  }}
/>

Props

  • active: boolean — inicia/detiene la sesión de cámara (por defecto true)
  • torchOn: boolean — enciende/apaga el flash si disponible (por defecto false)
  • onCodeScanned: (value: string) => void — se llama al detectar un QR

Ejemplo de navegación (sin librerías externas)

Revisa example/App.tsx con 3 pantallas simples usando estado local.

Notas

  • Android utiliza ZXing core desde Maven Central. Si tu app ya trae ZXing por otra librería, Gradle unificará la versión automáticamente.
  • iOS requiere iOS 12+ (según el Podspec) y ha sido probado en dispositivos reales.

Licencias de terceros

Se utiliza ZXing core (Apache License 2.0) para la decodificación de QR en Android.

  • ZXing core: https://github.com/zxing/zxing (Apache-2.0)
  • Consulta THIRD_PARTY_NOTICES.md para más detalles.

Evitar conflictos de clases duplicadas (Android)

Si ves un error Duplicate class com.google.zxing... es porque tu app o alguna otra librería trae otra versión de ZXing.

Soluciones (elige una):

  • Forzar una única versión con dependencyResolutionManagement o constraints en tu app/build.gradle:

    implementation(platform("com.google.zxing:core:3.5.3"))

  • O excluir la transitive dependency de ZXing de la otra librería que lo trae:

    implementation('alguna:lib:1.2.3') { exclude group: 'com.google.zxing', module: 'core' }

  • O ajustar la versión que prefiera tu proyecto con configurations.all { resolutionStrategy.force 'com.google.zxing:core:3.5.3' }.

Troubleshooting

  • Crash en iOS al abrir la cámara con “Thread 11: SIGABRT” y mensaje sobre permisos: falta la clave NSCameraUsageDescription en el Info.plist. Añádela siguiendo los pasos de arriba.
  • En simulador iOS la cámara puede estar limitada; prueba en dispositivo real.

Licencia

MIT