{"id":1541,"url":"https://github.com/aschuch/QRCode","last_synced_at":"2025-08-02T04:31:38.992Z","repository":{"id":26504029,"uuid":"29956552","full_name":"aschuch/QRCode","owner":"aschuch","description":"A QRCode generator written in Swift.","archived":false,"fork":false,"pushed_at":"2022-04-01T10:54:13.000Z","size":165,"stargazers_count":738,"open_issues_count":33,"forks_count":198,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-10-29T19:58:11.535Z","etag":null,"topics":["qrcode","qrcode-generator","swift"],"latest_commit_sha":null,"homepage":null,"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/aschuch.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":"2015-01-28T07:48:52.000Z","updated_at":"2024-09-17T04:52:10.000Z","dependencies_parsed_at":"2023-01-14T10:00:21.392Z","dependency_job_id":null,"html_url":"https://github.com/aschuch/QRCode","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschuch%2FQRCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschuch%2FQRCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschuch%2FQRCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschuch%2FQRCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aschuch","download_url":"https://codeload.github.com/aschuch/QRCode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222270723,"owners_count":16958589,"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":["qrcode","qrcode-generator","swift"],"created_at":"2024-01-05T20:15:49.345Z","updated_at":"2024-12-06T08:31:11.314Z","avatar_url":"https://github.com/aschuch.png","language":"Swift","readme":"# QRCode 🔳\n\n[![Build Status](https://travis-ci.org/aschuch/QRCode.svg)](https://travis-ci.org/aschuch/QRCode)\n![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)\n![Swift 3.0](https://img.shields.io/badge/Swift-3.0-orange.svg)\n\nA QRCode generator written in Swift.\n\n![QRCode Example](Resources/example.png)\n\n## Overview\n\nCreate a new QRCode representing a `URL`, a string or arbitrary data.\nThe following examples all result in the same QRCode image.\n\n```swift\n// URL\nlet url = URL(string: \"http://schuch.me\")!\nlet qrCode = QRCode(url)\nqrCode?.image\n\n// String\nlet qrCode = QRCode(\"http://schuch.me\")\nqrCode?.image\n\n// NSData\nlet data = \"http://schuch.me\".data(using: .isoLatin1)!\nlet qrCode = QRCode(data)\nqrCode.image\n```\n\n### Customize the output image\n\n\u003e Make sure to declare your `QRCode` instance as a variable in order make use of the following features.\n\n**Adjust Output Size**\n\nChange the output size of the QRCode output image via the `size` property.\n\n```swift\nqrCode.size = CGSize(width: 300, height: 300)\nqrCode.image // UIImage (300x300)\n```\n\n**Color**\n\nModify the colors of the QRCode output image via `color` and `backgroundColor` properties.\n\n```swift\nqrCode.color = CIColor(rgba: \"16a085\")\nqrCode.backgroundColor = CIColor(rgba: \"000\")\nqrCode.image // UIImage (green QRCode color and black background)\n```\n\n\u003e **Note**: The above examples make use of the `CIColor` extension that ships with this project to create colors based on HEX strings. \n\n### UIImageView extension\n\nFor convenience, a `UIImageView` extension is provided to directly initialize an image view with an instance of `QRCode`.\n\n```swift\nlet imageView = UIImageView(qrCode: qrCode)\n```\n\n### Emoji alias\n\nIn case you love emoji as much as I do, make sure to create your `QRCode` instance using the 🔳 typealias.\n\n```swift\nlet qrCode = 🔳(\"http://example.com\")\n```\n\n## Version Compatibility\n\nCurrent Swift compatibility breakdown:\n\n| Swift Version | Framework Version |\n| ------------- | ----------------- |\n| 3.0\t        | 2.x          \t\t|\n| 2.3\t        | 1.x          \t\t|\n| 2.2           | 0.x          \t\t|\n\n[all releases]: https://github.com/aschuch/QRCode/releases\n\n## Installation\n\n#### Carthage\n\nAdd the following line to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile).\n\n```\ngithub \"aschuch/QRCode\"\n```\n\nThen run `carthage update`.\n\n#### Cocoapods\n\nAdd the following line to your Podfile.\n\n```\npod \"QRCode\"\n```\n\nThen run `pod install` with Cocoapods 0.36 or newer.\n\n#### Manually\n\nJust drag and drop the three `.swift` files in the `QRCode` folder into your project.\n\n## Tests\n\nOpen the Xcode project and press `⌘-U` to run the tests.\n\nAlternatively, all tests can be run from the terminal using [xctool](https://github.com/facebook/xctool).\n\n```bash\nxctool -scheme QRCodeTests -sdk iphonesimulator test\n```\n\n## Todo\n\n* Snapshot Tests\n* Support transparent backgrounds\n\n## Contributing\n\n* Create something awesome, make the code better, add some functionality,\n  whatever (this is the hardest part).\n* [Fork it](http://help.github.com/forking/)\n* Create new branch to make your changes\n* Commit all your changes to your branch\n* Submit a [pull request](http://help.github.com/pull-requests/)\n\n\n## Contact\n\nFeel free to get in touch.\n\n* Website: \u003chttp://schuch.me\u003e\n* Twitter: [@schuchalexander](http://twitter.com/schuchalexander)\n","funding_links":[],"categories":["Media"],"sub_categories":["Media Processing","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faschuch%2FQRCode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faschuch%2FQRCode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faschuch%2FQRCode/lists"}