{"id":17243090,"url":"https://github.com/dmrschmidt/qrcode","last_synced_at":"2025-09-03T07:45:17.453Z","repository":{"id":54401682,"uuid":"81606957","full_name":"dmrschmidt/QRCode","owner":"dmrschmidt","description":"A QRCode Generator in Swift","archived":false,"fork":false,"pushed_at":"2022-11-30T08:11:33.000Z","size":3153,"stargazers_count":104,"open_issues_count":0,"forks_count":21,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-08-24T08:45:09.781Z","etag":null,"topics":["qrcode","qrcode-generator","qrcode-ios","qrcodes","swift"],"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/dmrschmidt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["dmrschmidt"],"custom":["https://www.buymeacoffee.com/dmrschmidt"]}},"created_at":"2017-02-10T21:09:31.000Z","updated_at":"2025-08-02T22:17:06.000Z","dependencies_parsed_at":"2022-08-13T14:31:16.373Z","dependency_job_id":null,"html_url":"https://github.com/dmrschmidt/QRCode","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/dmrschmidt/QRCode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrschmidt%2FQRCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrschmidt%2FQRCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrschmidt%2FQRCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrschmidt%2FQRCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmrschmidt","download_url":"https://codeload.github.com/dmrschmidt/QRCode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrschmidt%2FQRCode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273410271,"owners_count":25100454,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","qrcode-ios","qrcodes","swift"],"created_at":"2024-10-15T06:14:44.634Z","updated_at":"2025-09-03T07:45:17.424Z","avatar_url":"https://github.com/dmrschmidt.png","language":"Swift","funding_links":["https://github.com/sponsors/dmrschmidt","https://www.buymeacoffee.com/dmrschmidt"],"categories":[],"sub_categories":[],"readme":"# QRCode - A QR Code Generator in Swift\n\n[![Build Status](https://travis-ci.org/dmrschmidt/QRCode.svg?branch=master)](https://travis-ci.org/dmrschmidt/QRCode/)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Swift Package Manager compatible](https://img.shields.io/badge/spm-compatible-brightgreen.svg?style=flat)](https://swift.org/package-manager)\n\nA simple QR code image generator to use in your apps, written in Swift 5.\n\n# More related iOS Controls\n\nYou may also find the following iOS controls written in Swift interesting:\n\n* [SwiftColorWheel](https://github.com/dmrschmidt/SwiftColorWheel) - a delightful color picker\n* [DSWaveformImage](https://github.com/dmrschmidt/DSWaveformImage) - draw an audio file's waveform image\n\nIf you really like this library (aka Sponsoring)\n------------\nI'm doing all this for fun and joy and because I strongly believe in the power of open source. On the off-chance though, that using my library has brought joy to you and you just feel like saying \"thank you\", I would smile like a 4-year old getting a huge ice cream cone, if you'd support my via one of the sponsoring buttons ☺️💕\n\nIf you're feeling in the mood of sending someone else a lovely gesture of appreciation, maybe check out my iOS app [💌 SoundCard](https://www.soundcard.io) to send them a real postcard with a personal audio message.\n\n\u003ca href=\"https://www.buymeacoffee.com/dmrschmidt\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\n\n# Installation\n\n* use SPM: add `https://github.com/dmrschmidt/QRCode` and set \"Up to Next Major\" with \"1.0.0\"\n* use carthage: `github \"dmrschmidt/QRCode\", ~\u003e 1.0.0`\n* ~~use cocoapods: `pod 'SimpleQRCode', '~\u003e 0.6.0'`~~\n\n# Usage\n\nYou can create a `QRCode` from either `(NS)Data`, `(NS)String` or `(NS)URL`:\n\n```swift\n// create a QRCode with all the default values\nlet qrCodeA = QRCode(data: myData)\nlet qrCodeB = QRCode(string: \"my awesome QR code\")\nlet qrCodeC = QRCode(url: URL(string: \"https://example.com\"))\n```\n\nTo get the `UIImage` representation of your created qrCode, simply call it's\n`image` method:\n\n```swift\nlet myImage: UIImage? = try? qrCode.image()\n```\n\nIf you provide a desired `size` for the output image (see Customization below),\nthis method can throw, in case the desired image size is too small for the data\nbeing provided, i.e. some pixels would need to be omitted during scaling.\n\nThere is an alternative attribute `unsafeImage` accessible, which will simply\nreturn `nil` in these cases. If you never specify any custom size however, you\ncould use `unsafeImage` instead, since the image will automatically pick the\nideal size.\n\nTo show the `QRCode` in a `UIImageView`, and if you're a fan of extensions,\nyou may want to consider creating an extension in your app like so:\n\n```swift\nextension UIImageView {\n    convenience init(qrCode: QRCode) {\n        self.init(image: qrCode.unsafeImage)\n    }    \n}\n```\n\n## Customization\n\nA `QRCode` image can be customized in the following ways:\n\n```swift\n// As an immutable let, by setting all up in the respective constructors.\n// This is the recommended approach.\nlet qrCode = QRCode(string: \"my customized QR code\",\n                    color: UIColor.red,\n                    backgroundColor: UIColor.green,\n                    imageSize: CGSize(width: 100, height: 100),\n                    scale: 1.0,\n                    inputCorrection: .medium)\n\n// As a mutable var, by setting the individual parameters.\nvar qrCode = QRCode(string: \"my customizable QR code\")\nqrCode.color = UIColor.red // image foreground (or actual code) color\nqrCode.backgroundColor = UIColor.blue // image background color\nqrCode.size = CGSize(width: 300, height: 300) // final scaled image size\nqrCode.scale = 1.0 // image scaling factor\nqrCode.inputCorrection = .quartile // amount of error correction information added\n```\n\n![Screenshot](https://github.com/dmrschmidt/QRCode/blob/main/screenshot.png)\n\n## See it live in action\n\n[SoundCard - postcards with sound](https://www.soundcard.io) lets you send real, physical postcards with audio messages. Right from your iOS device.\n\nQRCode is used to place a scannable code, which links to the audio message, on postcards sent by [SoundCard - postcards with audio](https://www.soundcard.io).\n\n\u0026nbsp;\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"http://bit.ly/soundcardio\"\u003e\n        \u003cimg src=\"https://github.com/dmrschmidt/DSWaveformImage/blob/main/appstore.svg\" alt=\"Download SoundCard\"\u003e\n        \nDownload SoundCard on the App Store.\n    \u003c/a\u003e\n\u003c/div\u003e\n\n\u0026nbsp;\n\n\u003ca href=\"http://bit.ly/soundcardio\"\u003e\n\u003cimg src=\"https://github.com/dmrschmidt/DSWaveformImage/blob/main/screenshot3.png\" alt=\"Screenshot\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmrschmidt%2Fqrcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmrschmidt%2Fqrcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmrschmidt%2Fqrcode/lists"}