Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sparrowcode/spqrcode
The native QR code scanner of iOS. Repeated system scanner from the camera app.
https://github.com/sparrowcode/spqrcode
ios qr qr-code qr-scanner qrcode qrscanner spm swift uikit url xcode
Last synced: 2 days ago
JSON representation
The native QR code scanner of iOS. Repeated system scanner from the camera app.
- Host: GitHub
- URL: https://github.com/sparrowcode/spqrcode
- Owner: sparrowcode
- License: mit
- Created: 2022-03-04T05:05:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-30T12:56:23.000Z (12 months ago)
- Last Synced: 2024-05-01T09:41:50.910Z (7 months ago)
- Topics: ios, qr, qr-code, qr-scanner, qrcode, qrscanner, spm, swift, uikit, url, xcode
- Language: Swift
- Homepage:
- Size: 79.1 KB
- Stars: 78
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# SPQRCode
### iOS Dev Community
## Installation
Ready for use on iOS 13+.
### Swift Package Manager
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
Once you have your Swift package set up, adding as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
```swift
dependencies: [
.package(url: "https://github.com/sparrowcode/SPQRCode", .upToNextMajor(from: "1.0.4"))
]
```### Manually
If you prefer not to use any of dependency managers, you can integrate manually. Put `Sources/SPQRCode` folder in your Xcode project. Make sure to enable `Copy items if needed` and `Create groups`.
## Usage
Example for handle QRCode.
```swift
SPQRCode.scanning(
detect: { data, controller in
return data
},
handled: { data, controller in
controller.dismiss(animated: true)
},
on: viewController
)
```If you want allow handle only specific type, like url or Ethereum wallet, in `detect` handler retun `nil` if you don't want handle current QR code data.