A Simple iOS QR code scanner that allows users to enable their camera and local Photo Library accesses to scan the contents of the input QR codes.

Overview

iOS QR Code Scanner

A Simple iOS QR code scanner using Swift UI.
Jump to:
ContentView.swift screenshot 1.1.5
NOTE: be aware of the new horizontal line error to internal hyperlink redirecting in Documentations
Append the 'hr' command right after the preceeding line of documentation to enure the overall formatting stability.

Build

Setup
Debugging&Troubleshooting
Commits&Pushes Steps
Method Running The Project
Testing Result

Contribution

Author

Prerequisite

Developing tool: Xcode 13.4+ Swift, SwiftUI custom dependencies.

Compatibility

iPhone 11, iPhone 12, iPhone 13, iPad 10.2+

Setup

In Xcode IDE, go to info, click to add a Custom iOS Target Properties Key
Search for Privacy - Camera Usage Description
Value String: “We need the camera to scan the QR code” ->
This preset will enable users to turn on their camera Privacy for scanning

Secondarily, click to add Appearance Value String: Light ->
If the app is used on a physical device, this functionality will automatically maximize the brightness on the user’s devices for better scannability if QR code is detected.

Next, click File->Add Packages…-> add CodeScannerDependency into Package Dependencies.

Debugging&Troubleshooting

In order to prevent the occurence of

“Cannot assign value of type ‘ScanResult’ to type ‘String’ “ error

at

self.scannedCode = code

we need to use

self.scannedCode = code.string 

instead to make the value types compatible.

Commits&Pushes Steps

Must customize commit message for each commit:
Changes done in ContentView.swift file-> Save -> Source Control->Commit->Flat->Selected the committed file->Enter customized commit message down below->Select Push to Remote (origin/origin/main)-> Commit N files. Done Committing.
NOTE: To retain each commit to Github Repositories:
Must save -> resume -> rebuild on Simulator -> push both hierarchical and flat modified files and assets remotely to the Github origin/main.

Method Running The Project

Download the project to local directory
Xcode must be 13.4 and higher versions
Compatible with MacOS Monterey 12.0 or higher versions
Enable Camera access or Local Photo Library access in local device.

Testing Result

Online QR code generator
Starting UI that prompts user to scan a QR code to get started: screenshot 1.1.6
iOS 15.5 Simulator message. Camera access isn’t available on Xcode Simulator, so select a custom image: screenshot 1.1.7
Testing on url link: screenshot 1.0.7 screenshot 1.0.8
Testing on random text: screenshot 1.1.0 screenshot 1.1.1
Testing on image: screenshot 1.1.2 screenshot 1.1.3 screenshot 1.1.4

Author

Krystal Zhang https://github.com/KrystalZhang612


This file was generated by QRCodeScanner-readme, on June 18, 2022

You might also like...
A better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.
A better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.

EFQRCode is a lightweight, pure-Swift library for generating stylized QRCode images with watermark or icon, and for recognizing QRCode from images, in

A QR Code Scanning Framework For IOS

QRReader A QR Code Scanning Framework For IOS Requirements: IOS 11+ Xcode: 12+ Installation: steps to install this framework in your xcode project Pod

 ZATCA (Fatoora) QR-Code Implementation in iOS
ZATCA (Fatoora) QR-Code Implementation in iOS

An unofficial package to help iOS developers to implement ZATCA (Fatoora) QR code easily which required for e-invoicing in iOS Apps on smart phones and POS devices.

Custom rounded QR code with lots of customization.
Custom rounded QR code with lots of customization.

RoundCode for iOS RoundCode is custom circular QR code with lots of customization. Similar to Facebook messenger and Apple's App Clip Codes the RoundC

Simple QRCode reader in Swift
Simple QRCode reader in Swift

QRCodeReader.swift is a simple code reader (initially only QRCode) for iOS in Swift. It is based on the AVFoundation framework from Apple in order to

GraphQL-GitHub-Reader - Simple sample project that demonstrates how to connect with GitHub's API using GraphQL + Apollo
GraphQL-GitHub-Reader - Simple sample project that demonstrates how to connect with GitHub's API using GraphQL + Apollo

GHPViewer A beatiful way to see your GitHub Profile Installation The project is splitted in two folders: GHPViewer: Contains the iOS Application relat

DGQR - A lightweight, pure-Swift library for rendering qr
DGQR - A lightweight, pure-Swift library for rendering qr

DGQR DGQR is a lightweight, pure-Swift library for rendering qr. It provides you

🏁 make QRcode and QRcode Reader Tutorial
🏁 make QRcode and QRcode Reader Tutorial

QRCodeReaderTutorial-iOS 🏁 make QRcode and QRcode Reader Tutorial QR코드와 리더기를 만드는 오픈 라이브러리가 있지만 자체 라이브러리를 활용해서 만들어보기로 했다. 목차 QR코드 만들기 QR코드 Reader 만들기

Allows users to pull in new song releases from their favorite artists and provides users with important metrics like their top tracks, top artists, and recently played tracks, queryable by time range.

Spotify Radar Spotify Radar is an iOS application that allows users to pull in new song releases from their favorite artists and provides users with i

Scanner for decks of cards with bar codes printed on card edges
Scanner for decks of cards with bar codes printed on card edges

The Nettle Magic Project This deck of cards has a bar code printed on the edge of each card. Scanning these bar codes would reveal where every card is

A customisable view for entering arbitrary length pins, codes or passwords in iOS. Supports iOS 12 one time codes.
A customisable view for entering arbitrary length pins, codes or passwords in iOS. Supports iOS 12 one time codes.

CBPinEntryView CBPinEntryView is a view written in Swift to allow easy and slick entry of pins, codes or passwords. It allows backspacing, dismissal o

CHIOTPField is a set of textfields that can be used for One-time passwords, SMS codes, PIN codes, etc. Mady by @ChiliLabs - https://chililabs.io
CHIOTPField is a set of textfields that can be used for One-time passwords, SMS codes, PIN codes, etc. Mady by @ChiliLabs - https://chililabs.io

CHIOTPField CHIOTPField is a set of textfields that can be used for One-time passwords, SMS codes, PIN codes, etc. All fields support insertion of one

Phimp.me - Photo Image Editor and Sharing App. Phimp.me is a Photo App for iOS that aims to replace proprietary photo applications. It offers features such as taking photos, adding filters, editing images and uploading them to social networks. DTPhotoViewerController - A fully customizable photo viewer ViewController to display single photo or collection of photos, inspired by Facebook photo viewer.
DTPhotoViewerController - A fully customizable photo viewer ViewController to display single photo or collection of photos, inspired by Facebook photo viewer.

DTPhotoViewerController Example Demo video: https://youtu.be/aTLx4M4zsKk DTPhotoViewerController is very simple to use, if you want to display only on

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Features • Guides • Installation • Usage • Miscellaneous • Contributing 🌎 README is available in other languages: 🇪🇸 . 🇨🇳 . 🇧🇷 . 🇰🇷 . 🇫🇷 To

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Features • Guides • Installation • Usage • Miscellaneous • Contributing 🌎 README is available in other languages: 🇪🇸 . 🇨🇳 . 🇧🇷 . 🇰🇷 . 🇫🇷 To

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Features • Guides • Installation • Usage • Miscellaneous • Contributing 🌎 README is available in other languages: 🇪🇸 . 🇨🇳 . 🇧🇷 . 🇰🇷 . 🇫🇷 To

SharedImages Screen grabs Main Features Private & self-owned social media Users store their images in their own cloud storage (Dropbox or Google Drive

SharedImages Screen grabs Main Features Private & self-owned social media Users store their images in their own cloud storage (Dropbox or Google Drive

Owner
Krystal Zhang
Hey there! Welcome to my Github page! I'm Krystal Zhang, currently majoring in Computer Science in UC Davis. Let's together build something!
Krystal Zhang
QR Blank - QR Code URL scanner

QR Blank - QR Code URL scanner No Ads, Clean, Simple open source QR Code URL scanner Check URL by Google Safe Browsing before open. Google Safe Browsi

Johnson Kaho Poon 37 Feb 7, 2022
:mag_right: A simple and beautiful barcode scanner.

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

HyperRedink 1.6k Dec 30, 2022
BarcodeScannerSwift - Barcode Scanner Built With Swift

BarcodeScannerSwift This repository was built for a supermarket. Employees can k

Cuma Haznedar 2 Dec 31, 2022
QRCode Scanner using Apple in build Vision framework.

?? iOS13 DKQRReader Example A quick example showing how to use the Vision system-framework in iOS 13 and Swift 5. Prerequisites Xcode 13 and later Get

Dineshkumar Kandasamy 3 Jun 22, 2022
Oak is an iOS app built with SwiftUI for managing your 2FA codes

?? ?? OakOTP OakOTP is an iOS app built with SwiftUI for managing your 2FA codes. Supports iPhone & iPad Supports scanning a QR code or entering crede

AlexCatch 23 Nov 29, 2022
With QRKit you can easily create QR or bar codes in Swift.

With QRKit you can easily create QR or bar codes in Swift. You can choose foreground and background colors. The QR code you get simply as UIImage.

Technikabo 1 Jun 11, 2022
A simple Safari web extension that displays a QR code for the webpage in focus.

QR Pop ?? QR Pop is a simple iOS & MacOS app and Safari extension built to make displaying QR codes easy. The Safari Extension is inspired by the quic

Shawn 9 Dec 11, 2022
Simple application for creating QR code with a background

BeautifyQR Импортирует исходный QR-код из галереи Накладывает его на выбранную картинку с фоном Полученную картинку можно вынести виджетом на домашний

Dmitry Demianov 1 Nov 28, 2021
QR code detector. Simple usage, you can get recognition results via delegate or callback.

SPQRCode QR code detector. Simple usage, you can get recognition results via delegate or callback. Installation Swift Package Manager CocoaPods Manual

Sparrow Code 58 Jan 6, 2023
A better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.

EFQRCode is a lightweight, pure-Swift library for generating stylized QRCode images with watermark or icon, and for recognizing QRCode from images, in

EFPrefix 4.3k Dec 29, 2022