ScanBarcodes is a SwiftUI view that scans barcodes using an iPhone or iPad camera.

Related tags

Camera ScanBarcodes
Overview

ScanBarcodes

ScanBarcodes is a SwiftUI view that scans barcodes using an iPhone or iPad camera.

The framework uses AVFoundation for high performance video capture and barcode recognition. The view also provides optional control of the flashlight and the zoom level of the camera.

Getting started

Try the demo application

Two important notes on usage:

  1. an actual phone is required (iOS simulator doesn't yet support the camera)
  2. an entry in the app Info.plist for "Privacy - Camera Usage Description" is required to prompt for user permission to use the camera to scan barcodes.

The view takes two required arguments and two optional arguments:

  • barcodeTypes: [AVMetadataMachineReadableCodeObject.ObjectType] (required)
  • zoomLevel : Binding (optional, defaults to 1, values greater than 1 increase the zoom)
  • flashlightOn: Binding (optional, defaults to false)
  • completion: @escaping (Result ) -> Void) (required, a closure to execute when a result is obtained)

Copyright

Copyright © 2021 California Institute of Technology. ALL RIGHTS RESERVED. United States Government Sponsorship Acknowledged.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Credits

This project was based on CodeScanner by Paul Hudson and liberally modified.

You might also like...
iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing

SCRecorder A Vine/Instagram like audio/video recorder and filter framework in Objective-C. In short, here is a short list of the cool things you can d

A simple, customizable camera control - video recorder for iOS.
A simple, customizable camera control - video recorder for iOS.

LLSimpleCamera: A simple customizable camera - video recorder control LLSimpleCamera is a library for creating a customized camera - video recorder sc

BarcodeScanner is a simple and beautiful wrapper around the camera with barcode capturing functionality and a great user experience.
BarcodeScanner is a simple and beautiful wrapper around the camera with barcode capturing functionality and a great user experience.

Description BarcodeScanner is a simple and beautiful wrapper around the camera with barcode capturing functionality and a great user experience. Barco

Fasttt and easy camera framework for iOS with customizable filters
Fasttt and easy camera framework for iOS with customizable filters

FastttCamera is a wrapper around AVFoundation that allows you to build your own powerful custom camera app without all the headaches of using AVFounda

A light weight & simple & easy camera for iOS by Swift.
A light weight & simple & easy camera for iOS by Swift.

DKCamera Description A light weight & simple & easy camera for iOS by Swift. It uses CoreMotion framework to detect device orientation, so the screen-

Camera engine for iOS, written in Swift, above AVFoundation. :monkey:
Camera engine for iOS, written in Swift, above AVFoundation. :monkey:

🌟 The most advanced Camera framework in Swift 🌟 CameraEngine is an iOS camera engine library that allows easy integration of special capture feature

A Snapchat Inspired iOS Camera Framework written in Swift
A Snapchat Inspired iOS Camera Framework written in Swift

Overview SwiftyCam is a a simple, Snapchat-style iOS Camera framework for easy photo and video capture. SwiftyCam allows users to capture both photos

A camera designed in Swift for easily integrating CoreML models - as well as image streaming, QR/Barcode detection, and many other features
A camera designed in Swift for easily integrating CoreML models - as well as image streaming, QR/Barcode detection, and many other features

Would you like to use a fully-functional camera in an iOS application in seconds? Would you like to do CoreML image recognition in just a few more sec

Mock UIImagePickerController for testing camera based UI in simulator
Mock UIImagePickerController for testing camera based UI in simulator

Mock UIImagePickerController to simulate the camera in iOS simulator.

Owner
NASA Jet Propulsion Laboratory
A world leader in the robotic exploration of space
NASA Jet Propulsion Laboratory
Library for iOS Camera API. CameraKit helps you add reliable camera to your app quickly.

CameraKit helps you add reliable camera to your app quickly. Our open source camera platform provides consistent capture results, service that scales, and endless camera possibilities.

CameraKit 628 Dec 27, 2022
ALCameraViewController - A camera view controller with custom image picker and image cropping.

ALCameraViewController A camera view controller with custom image picker and image cropping. Features Front facing and rear facing camera Simple and c

Alex Littlejohn 2k Dec 6, 2022
Simple Swift class to provide all the configurations you need to create custom camera view in your app

Camera Manager This is a simple Swift class to provide all the configurations you need to create custom camera view in your app. It follows orientatio

Imaginary Cloud 1.3k Dec 29, 2022
IPadLiDARExperiment - Simple experiment to capture Depth data from the iPad Pro's LiDAR

iPad LiDAR Experiment Simple experiment to capture and display Depth data from t

Fabio 16 Jul 25, 2022
UIView+CameraBackground - Show camera layer as a background to any UIView.

UIView+CameraBackground Show camera layer as a background to any UIView. Features Both front and back camera supported. Flash modes: auto, on, off. Co

Yonat Sharon 63 Nov 15, 2022
Instagram-like photo browser and a camera feature with a few line of code in Swift.

Fusuma is a Swift library that provides an Instagram-like photo browser with a camera feature using only a few lines of code.

Yuta Akizuki 2.4k Dec 31, 2022
NextLevel is a Swift camera system designed for easy integration, customized media capture, and image streaming in iOS

NextLevel is a Swift camera system designed for easy integration, customized media capture, and image streaming in iOS. Integration can optionally leverage AVFoundation or ARKit.

NextLevel 2k Jan 2, 2023
This plugin defines a global navigator.camera object, which provides an API for taking pictures and for choosing images from the system's image library.

title description Camera Take pictures with the device camera. AppVeyor Travis CI cordova-plugin-camera This plugin defines a global navigator.camera

null 0 Nov 2, 2021
Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS projects.

?? Warning This repository is DEPRECATED and not maintained anymore. Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS

Tudo Gostoso Internet 1.4k Dec 16, 2022
A fully customisable and modern camera implementation for iOS made with AVFoundation.

Features Extremely simple and easy to use Controls autofocus & exposure Customizable interface Code-made UI assets that do not lose resolution quality

Gabriel Alvarado 1.3k Nov 30, 2022