{"id":28069881,"url":"https://github.com/andrealufino/qrdispenser","last_synced_at":"2025-05-12T19:16:02.590Z","repository":{"id":63903603,"uuid":"525461574","full_name":"andrealufino/QRDispenser","owner":"andrealufino","description":"QR code generator in Swift, with no external dependencies.","archived":false,"fork":false,"pushed_at":"2023-03-24T19:05:56.000Z","size":483,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T19:15:57.927Z","etag":null,"topics":["ios","native","qr","qr-code","qr-code-generator","qr-generator","qrcode","qrcode-generator","swift","uiimage","url"],"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/andrealufino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-16T16:34:26.000Z","updated_at":"2024-07-13T15:50:22.000Z","dependencies_parsed_at":"2023-01-14T13:00:52.267Z","dependency_job_id":null,"html_url":"https://github.com/andrealufino/QRDispenser","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrealufino%2FQRDispenser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrealufino%2FQRDispenser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrealufino%2FQRDispenser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrealufino%2FQRDispenser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrealufino","download_url":"https://codeload.github.com/andrealufino/QRDispenser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253805839,"owners_count":21967054,"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","native","qr","qr-code","qr-code-generator","qr-generator","qrcode","qrcode-generator","swift","uiimage","url"],"created_at":"2025-05-12T19:16:01.900Z","updated_at":"2025-05-12T19:16:02.584Z","avatar_url":"https://github.com/andrealufino.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"Icon.png\" width=\"65%\"/\u003e\n\u003c/p\u003e\n\n`QRDispenser` is a lightweight library to generate a QR code as image (`UIImage`) in your app. It uses only native components, with no dependency from other libraries. This allows you to also fork the project and write your own implementation in case you need it, without worrying about external frameworks.\n\n## Structure\n\nThe structure of the library is simple: there's only one class that you use and it's the `QRDispenser`. It has these methods:\n\n- `generate(from: String, tint: UIColor)`\n- `generate(url: URL)`\n- `generate(email: String)`\n- `generate(phoneNumber: String)`\n- `generate(wiFiSSID: String, password: String, encryption: WiFiEncryption)`\n- `generate(latitude: Double, longitude: Double, altitude: Double)`\n- `generate(location: CLLocation)`\n\nEvery method returns a `UIImage` object or throws an error. The error enumeration is `QRDispenserError`. The code is well documented about every method, if you need more details check directly on Xcode.\n\nThere's also a nice thing that I plan to expand in the future that is an extension for `URL`. The extension has a computed property that returns a QR code containing the url, if the url is a network url (no local ones for now). It works like this: \n\n```swift\nlet url = \"https://andrealufino.com\"\n\nlet qrImage = url.qrRepresentation\n```\n\nI'd like to expand this kind of structure also to other types, like strings, contacts and events.\n\n## iOS version\n\nThis library needs at least iOS 14.\n\n## Installation\n\nThe library is available via Swift Package Manager. Just add the url of this repository.\n\n## Author\n\n[Andrea Mario Lufino](andrealufino.com), iOS developer since 2010.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrealufino%2Fqrdispenser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrealufino%2Fqrdispenser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrealufino%2Fqrdispenser/lists"}