-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Implement React Native Scanner v1.6.0-beta.1 with New Architecture support #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement React Native Scanner v1.6.0-beta.1 with New Architecture support #51
Conversation
Add complete implementation of @pushpendersingh/react-native-scanner package with: - New Architecture support (Turbo Modules & Fabric) - Cross-platform QR & Barcode scanner for iOS and Android - CameraX integration for Android - AVFoundation integration for iOS - Support for 13+ barcode formats - Flashlight toggle feature - Real-time camera preview - Example app with full implementation - CI/CD workflows and GitHub Actions - Comprehensive documentation and setup guides
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a complete implementation of @pushpendersingh/react-native-scanner v1.6.0-beta.1, a QR code and barcode scanner library for React Native with full New Architecture support (Turbo Modules & Fabric).
- Comprehensive implementation with 13+ barcode format support using CameraX (Android) and AVFoundation (iOS)
- Complete project structure including TypeScript source, native implementations, example app, tests, and CI/CD workflows
- New Architecture ready with Turbo Module and Fabric component specifications
Reviewed Changes
Copilot reviewed 84 out of 105 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ | TypeScript implementation with camera view component and native module interfaces |
| ios/ | Swift/Objective-C++ native implementation using AVFoundation and Vision frameworks |
| android/ | Kotlin native implementation using CameraX and ML Kit for barcode scanning |
| example/ | Complete React Native example application demonstrating scanner usage |
| package.json | Package configuration with React Native 0.81+ support and New Architecture setup |
| .github/ | CI/CD workflows for testing, building, and maintaining the project |
Files not reviewed (1)
- example/ios/ReactNativeScannerExample.xcworkspace/contents.xcworkspacedata: Language not supported
Comments suppressed due to low confidence (1)
android/src/main/java/com/pushpendersingh/reactnativescanner/CameraManager.kt:1
- [nitpick] Debug logging statements should be removed or use proper logging levels. Consider using Android's Log class with appropriate log levels instead of print statements.
package com.pushpendersingh.reactnativescanner
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerModule.kt
Outdated
Show resolved
Hide resolved
- Add comprehensive permission handling section to README - Recommend react-native-permissions for production apps - Document built-in method limitations - Add Known Limitations section - Add Roadmap with planned enhancements - Update inline code comments in ReactNativeScannerModule.kt This addresses reviewer feedback about incomplete permission implementation while providing users with industry-standard alternatives. Ref: #51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 84 out of 105 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- example/ios/ReactNativeScannerExample.xcworkspace/contents.xcworkspacedata: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
android/src/main/java/com/pushpendersingh/reactnativescanner/ReactNativeScannerModule.kt
Show resolved
Hide resolved
- Add global type declaration for __turboModuleProxy - Fix event listener callback type mismatch in BarcodeScanner - Remove unused React import from example app - Suppress exhaustive-deps ESLint warning The library was working correctly but TypeScript strict mode was preventing successful builds with react-native-builder-bob.
📱 React Native Scanner v1.6.0-beta.1
🎯 Overview
This PR introduces a complete implementation of
@pushpendersingh/react-native-scanner, a powerful QR code & Barcode scanner for React Native with full New Architecture support (Turbo Modules & Fabric).✨ Key Features
🏗️ New Architecture Ready
📷 Scanner Capabilities
🔧 Platform-Specific Implementation
📦 Project Structure
📋 Changes Made
Source Code (
src/)CameraView.tsx- React component for camera previewNativeReactNativeScanner.ts- Native module interfaceReactNativeScannerViewNativeComponent.ts- Fabric component specindex.tsx- Main package export__tests__/- Unit testsAndroid Implementation (
android/)CameraManager.kt- Camera lifecycle and configurationReactNativeScannerView.kt- Camera preview viewReactNativeScannerViewManager.kt- View manager for FabricReactNativeScannerModule.kt- Turbo module implementationReactNativeScannerPackage.kt- Package registrationiOS Implementation (
ios/)CameraView.swift- Camera view implementationCameraManager.swift- Camera session managementCameraViewManager.mm- Objective-C++ view managerReactNativeScanner.mm- Turbo module implementationReactNativeScanner.h- Public headerReactNativeScanner-Bridging-Header.h- Swift bridgeExample Application (
example/)CI/CD & Workflows (
.github/workflows/)ci.yml- Continuous integration pipelinecheck-repro.yml- Issue reproduction checkersemantic-pr.yml- PR title validationstale.yml- Stale issue managementtriage.yaml- Issue triage automationversions.yml- Version compatibility checksConfiguration Files
.editorconfig- Code editor configuration.gitignore- Git ignore rules.nvmrc- Node version specification.yarnrc.yml- Yarn 3 configurationbabel.config.js- Babel configurationeslint.config.mjs- ESLint configurationtsconfig.json- TypeScript configurationturbo.json- Turborepo configurationlefthook.yml- Git hooks configurationDocumentation
README.md- Comprehensive usage guideCONTRIBUTING.md- Contribution guidelinesCODE_OF_CONDUCT.md- Community guidelinesLICENSE- MIT License🔢 Statistics
🚀 Type of Change
✅ Testing Checklist
📱 Platform Support
🔗 Dependencies
Runtime Dependencies
Native Dependencies
📖 Documentation
Complete documentation includes:
🎨 Code Quality