An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          


Project Icon


Version
Swift 6.1
Documentation
MIT License

# 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.


Demo Gif

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