https://github.com/danielsaidi/scancodes
A Swift library that lets you add QR codes and barcodes to your apps.
https://github.com/danielsaidi/scancodes
ios ipados macos swift swiftui tvos visionos
Last synced: 2 months ago
JSON representation
A Swift library that lets you add QR codes and barcodes to your apps.
- Host: GitHub
- URL: https://github.com/danielsaidi/scancodes
- Owner: danielsaidi
- License: mit
- Created: 2025-06-19T10:52:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-19T11:57:21.000Z (about 1 year ago)
- Last Synced: 2025-06-19T12:37:03.359Z (about 1 year ago)
- Topics: ios, ipados, macos, swift, swiftui, tvos, visionos
- Language: Shell
- Homepage: https://danielsaidi.com/opensource
- Size: 1020 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ScanCodes
ScanCodes is a Swift library with scan code features, such as a ``ScanCode`` SwiftUI view that can render any string value as a scan code.
ScanCodes extends ``Image`` as well as platform-specific image types with scan code-related functionality, and has a ``ScanCodeType`` enum that defines all supported scan code types.
## Installation
ScanCodes can be installed with the Swift Package Manager:
```
https://github.com/danielsaidi/ScanCodes.git
```
## Supported Platforms
ScanCodes supports iOS 15, iPadOS 15, macOS 12, tvOS 15, and visionOS 1.
## Getting Started
To render a scan code in SwiftUI, just add a ``ScanCode`` with the value and type to render:
```swift
struct ContentView: View {
var body: some View {
ScanCode(
value: "123456789",
type: .qr,
scale: 5,
rotation: .pi/4
)
}
}
```
You can use the same init arguments to create a SwiftUI ``SwiftUICore/Image`` and platform-specific image values.
## Documentation
The online [documentation][Documentation] has more information, articles, code examples, etc.
## Demo Application
The `Demo` folder has a demo app that lets you explore the library.
## Support My Work
You can [become a sponsor][Sponsors] to help me dedicate more time on my various [open-source tools][OpenSource]. Every contribution, no matter the size, makes a real difference in keeping these tools free and actively developed.
## Contact
Feel free to reach out if you have questions, or want to contribute in any way:
* Website: [danielsaidi.com][Website]
* E-mail: [daniel.saidi@gmail.com][Email]
* Bluesky: [@danielsaidi@bsky.social][Bluesky]
* Mastodon: [@danielsaidi@mastodon.social][Mastodon]
## License
ScanCodes is available under the MIT license. See the [LICENSE][License] file for more info.
[Email]: mailto:daniel.saidi@gmail.com
[Website]: https://danielsaidi.com
[GitHub]: https://github.com/danielsaidi
[OpenSource]: https://danielsaidi.com/opensource
[Sponsors]: https://github.com/sponsors/danielsaidi
[Bluesky]: https://bsky.app/profile/danielsaidi.bsky.social
[Mastodon]: https://mastodon.social/@danielsaidi
[Twitter]: https://twitter.com/danielsaidi
[Documentation]: https://danielsaidi.github.io/ScanCodes
[Getting-Started]: https://danielsaidi.github.io/ScanCodes/documentation/scancodes/getting-started
[License]: https://github.com/danielsaidi/ScanCodes/blob/master/LICENSE