Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

updates from twostraws/CodeScanner #4

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
1ee6f7c
Separate extension for AVCaptureMetadataOutputObjectsDelegate
qalandarov Jan 14, 2024
a199c82
Separate extension for UIImagePickerControllerDelegate
qalandarov Jan 14, 2024
b35892a
Separate extension for UIAdaptivePresentationControllerDelegate
qalandarov Jan 14, 2024
259c54e
Adds a couple of `MARK`'s to extensions
qalandarov Jan 14, 2024
05477e3
Update docs
karolbielski Feb 10, 2024
ba8e8d0
Update README
karolbielski Feb 10, 2024
cbf42a3
Update README
karolbielski Feb 10, 2024
eed1196
Update README
karolbielski Feb 10, 2024
e5f135e
Update README
karolbielski Feb 10, 2024
9cc6ae4
Update README
karolbielski Feb 10, 2024
718824a
Make AVCaptureDevice#setRecommendedZoomFactor(forMinimumCodeSize:) no…
karolbielski Feb 10, 2024
cc02694
Add docs
karolbielski Feb 10, 2024
a9dc96a
fix: available on catalyst
nathanfallet Feb 23, 2024
5a49d03
fix: available on catalyst
Feb 23, 2024
7da6b1e
Merge pull request #127 from karolbielski/bugfix/issue-124-113-89
nathanfallet Feb 23, 2024
e1943d7
Merge pull request #125 from qalandarov/separate-delegates
nathanfallet Feb 23, 2024
afca2ff
Ability to skip the photo if it's not required
qalandarov Jan 14, 2024
4c28fd3
shorter guard
nathanfallet Feb 23, 2024
0af227c
Merge pull request #129 from qalandarov/main
Feb 23, 2024
6124b72
Ability to continuously scan by ignoring specific codes
qalandarov Jan 14, 2024
9302aa1
Merge pull request #130 from qalandarov/main
Feb 23, 2024
11dd17b
Ability to pause scanning (i.e. when presenting)
qalandarov Jan 14, 2024
24ffca4
Minor improvement
qalandarov Jan 14, 2024
303bd5a
Merge pull request #131 from qalandarov/main
nathanfallet Feb 24, 2024
d1d7e2b
Renamed "requirePhotoOutput" to "requiresPhotoOutput"
psalzAppDev Feb 27, 2024
205588f
Improved code readability of ScannerViewController.
psalzAppDev Feb 27, 2024
739790a
Removed the macOS target since it doesn't compile anyway due to the u…
psalzAppDev Feb 27, 2024
83db36b
Cleanup of a print statement
psalzAppDev Mar 1, 2024
cfab6cd
Add privacy manifest file
Apr 13, 2024
3038ca7
Merge pull request #138 from benMohamed/PrivacyManifest
nathanfallet Apr 13, 2024
944a6a1
Merge pull request #132 from psalzAppDev/main
nathanfallet Apr 13, 2024
e993185
Add support for adding this lib to multi-platform targets where only …
Jeehut May 24, 2024
1e82159
Update AVCaptureDevice+bestForBuiltInCamera.swift
Thornfin May 31, 2024
f3586ac
Adding visionOS tests
nathanfallet May 31, 2024
23e9b6e
Merge pull request #145 from Jeehut/main
nathanfallet May 31, 2024
008bc06
fix: both cannot be public
nathanfallet May 31, 2024
34da57f
Merge pull request #146 from Thornfin/main
nathanfallet May 31, 2024
d89df51
Fix: In case that were no features found, it would not throw any erro…
tataruRobert Aug 21, 2024
b1b57e6
fix strong reference cycle as outlined in #150
xmanu Aug 23, 2024
9fa582f
Merge pull request #151 from xmanu/fix-strong-ref-cycle
Sep 11, 2024
3423730
Add `scanInterval` time unit to docs
praveenperera Sep 22, 2024
ef198d3
Dispatch failure on main queue to prevent crash
alfavata Nov 11, 2024
746c1c1
Merge pull request #149 from tataruRobert/my-feature-branch
nathanfallet Dec 1, 2024
3936070
Merge pull request #152 from praveenperera/patch-2
nathanfallet Dec 1, 2024
e24bd5a
Update build.yml
nathanfallet Dec 1, 2024
bc35850
Improving changes on feature detection safety
nathanfallet Dec 1, 2024
761b6ef
Update README.md
nathanfallet Dec 1, 2024
5e88643
Merge pull request #154 from alfavata/main
nathanfallet Dec 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions Sources/CodeScanner/ScannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -513,17 +513,22 @@ extension CodeScannerView.ScannerViewController: UIImagePickerControllerDelegate

let features = detector.features(in: ciImage)

for feature in features as! [CIQRCodeFeature] {
qrCodeLink = feature.messageString!
if qrCodeLink.isEmpty {
didFail(reason: .badOutput)
} else {
if features.isEmpty {
didFail(reason: .badOutput)
} else {
for feature in features.compactMap({ $0 as? CIQRCodeFeature }) {
guard let qrCodeLink = feature.messageString, !qrCodeLink.isEmpty else {
didFail(reason: .badOutput)
continue
}

let corners = [
feature.bottomLeft,
feature.bottomRight,
feature.topRight,
feature.topLeft
]

let result = ScanResult(string: qrCodeLink, type: .qr, image: qrcodeImg, corners: corners)
found(result)
}
Expand Down