{"id":15037203,"url":"https://github.com/hardiiik/qrbot","last_synced_at":"2026-03-16T21:37:14.446Z","repository":{"id":56921529,"uuid":"149556600","full_name":"hardiiik/QRBot","owner":"hardiiik","description":"QRBot, a QR Code Scanning and Generating library for iOS 8+, written in Swift 4.","archived":false,"fork":false,"pushed_at":"2018-10-16T09:51:12.000Z","size":91,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-20T13:02:34.765Z","etag":null,"topics":["ios","ios11","qrcode","qrcode-decoder","qrcode-encoder","qrcode-reader","qrcode-scanner","qrcoder-generator","swift","swift3","swift4"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hardiiik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-20T05:34:18.000Z","updated_at":"2018-10-16T09:50:50.000Z","dependencies_parsed_at":"2022-08-21T04:50:43.998Z","dependency_job_id":null,"html_url":"https://github.com/hardiiik/QRBot","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardiiik%2FQRBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardiiik%2FQRBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardiiik%2FQRBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardiiik%2FQRBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardiiik","download_url":"https://codeload.github.com/hardiiik/QRBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243402682,"owners_count":20285278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","ios11","qrcode","qrcode-decoder","qrcode-encoder","qrcode-reader","qrcode-scanner","qrcoder-generator","swift","swift3","swift4"],"created_at":"2024-09-24T20:33:45.406Z","updated_at":"2025-12-28T21:59:00.731Z","avatar_url":"https://github.com/hardiiik.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **QRBot**\n\nA QR Code Scanning and Generating library for iOS 8+, written in Swift 4.\n\n[![CI Status](https://img.shields.io/travis/hardiiik/QRBot.svg?style=flat)](https://travis-ci.org/hardiiik/QRBot)\n[![Version](https://img.shields.io/cocoapods/v/QRBot.svg?style=flat)](https://cocoapods.org/pods/QRBot)\n[![License](https://img.shields.io/cocoapods/l/QRBot.svg?style=flat)](https://cocoapods.org/pods/QRBot)\n[![Platform](https://img.shields.io/cocoapods/p/QRBot.svg?style=flat)](https://cocoapods.org/pods/QRBot)\n\n## Requirements\n\n`iOS 8+`\n\n## Installation\n\nQRBot is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'QRBot'\n```\n\n## Usage\n\nFollow the steps to use QRBot:\n\n- **Steps for scanning QR Code:**\n\n1. You need to give permission to access Camera in `Info.plist`.\n\n![Info.plist permission](QRBot/Assets/Info_plist.png)\n\n2. Make `QRCodeScannerViewController` superclass of your ViewController class.\n\n```swift\n class ViewController: QRCodeScannerViewController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n    }\n }\n```\n\n3. Conform/ Implement `QRCodeScannerDelegate` protocol and implement its method to perform your tasks.\n\n```swift\n class ViewController: QRCodeScannerViewController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n    }\n }\n extension ViewController: QRCodeScannerDelegate{\n    func scanner(_ connection: AVCaptureConnection, didOutput data: String) {\n        print(\"DemoApp : Data from QR Code - \\(data)\")\n        // Perform your actions here with data from QRCode\n    }\n }\n```\n( If `AVCaptureConnection` may show any error, just import `AVFoundation` in your ViewController. )\n\n```swift\n import UIKit\n import AVFoundation\n import QRBot\n \n class ViewController: QRCodeScannerViewController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n    }\n }\n extension ViewController: QRCodeScannerDelegate{\n    func scanner(_ connection: AVCaptureConnection, didOutput data: String) {\n        print(\"DemoApp : Data from QR Code - \\(data)\")\n        // Perform your actions here with data from QRCode\n    }\n }\n```\n\n4. Set `scannerDelegate` property of your ViewController to `self`.\n\n```swift\n class ViewController: QRCodeScannerViewController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        scannerDelegate = self\n    }\n }\n```\n5. All set. Now implement your tasks in delegate method.\n\n- **Steps for generating QR Code from your own data:**\n\n1. Import QRBot in your ViewController.\n\n```swift\n import QRBot\n```\n2. Call `generate()` method of `QRCode` class as shown below:\n\n```swift\n import UIKit\n import QRBot\n class YourViewController: UIViewController{\n    ovveride func viewDidLoad(){\n        super.viewDidLoad()\n        QRCode.generate(from: yourStringData,completion: { (image,error) in\n            if error == nil{\n                if let qrCodeImage = image{\n                    // Set qrCodeImage to your ImageView\n                    self.imageView.image = qrCodeImage // For example\n                }\n            }\n        })\n    }\n }\n```\n3. Below the list of supported methods are given. Their usages are as same as shown above.\n\n    1) Simple Black \u0026 White QR Code from your String data\n    \n    ```swift \n    QRCode.generate(from data: String, completion: @escaping (UIImage?,Error?) -\u003e Void)\n    ```\n    \n    2) Simple Black \u0026 White QRCode from your String data, with Image format you wish\n    \n    ```swift \n    QRCode.generate(from data: String, imageFormat format: QRCodeImageFormat,completion: @escaping (UIImage?,Error?) -\u003e Void)\n    ```\n    \n    Here, `QRCodeImageFormat` is enum having values like `.png`, `.jpg`, `.jpeg`, `.gif`.\n    \n    3) QRCode with different Pattern Colour and Background Colour\n    \n    ```swift \n    QRCode.generate(from data: String, patternColor color: QRCodeColor,backgroundColor bgcolor: QRCodeColor, completion: @escaping (UIImage?,Error?) -\u003e Void)\n    ```\n    \n    Here, `QRCodeColor` is enum, having all colours from Apple Colour Pallete.\n    \n    4) QRCode with different Pattern Colour and Background Colour, with Image format you wish\n    \n    ```swift\n    QRCode.generate(from data: String, patternColor color: QRCodeColor,backgroundColor bgcolor: QRCodeColor, imageFormat format: QRCodeImageFormat, completion: @escaping (UIImage?,Error?) -\u003e Void)\n    ```\n    \n## Example\n\nTake a look at Example Project for more clarity. To run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Author\n\nHardik Trivedi, hardiktrivedi3008.ht@gmail.com\n\n**Made with :heart: in India.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardiiik%2Fqrbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardiiik%2Fqrbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardiiik%2Fqrbot/lists"}