Skip to content

[EPIC-5957] iOS: DS 7.1.0 #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a5d3e98
update rtuui2 scanners
Superkachenya Jun 18, 2025
83bf506
remove code snippets project file
ranascanbot Jun 23, 2025
874b501
Add folders
ranascanbot Jun 23, 2025
cece04c
Merge branch 'master' into rso/restructure
ranascanbot Jun 23, 2025
b36f35e
fix SDK version
ranascanbot Jun 24, 2025
351619b
update readme
ranascanbot Jun 24, 2025
5bfc34c
Merge branch 'master' into release/v7.1.0
Superkachenya Jun 24, 2025
a284786
Merge remote-tracking branch 'origin/release/v7.1.0' into rso/restruc…
ranascanbot Jun 24, 2025
269b424
update scripts, remove nfc
Superkachenya Jun 24, 2025
af95e53
Merge branch 'prepare/v7.1.0' into rso/restructure
ranascanbot Jun 24, 2025
2a36f73
make all projects use 7.1.0 RC1
ranascanbot Jun 24, 2025
5b94150
Add SPM to classic component and update gitignore
ranascanbot Jun 24, 2025
648edde
Add SPM to DataCaptureRTUUI
ranascanbot Jun 24, 2025
400845f
Add SPM to DocumentRTUUI
ranascanbot Jun 24, 2025
1e4dd86
Add SPM to SwiftUI
ranascanbot Jun 24, 2025
2db0f14
update Readme
ranascanbot Jun 24, 2025
148eb8d
Fix project settings
sebastato Jun 24, 2025
3ad55f7
Fix project settings, dylib debug warnings and set SDK to 7.1.x
sebastato Jun 24, 2025
3978590
Merge pull request #114 from doo/rso/restructure
sebastato Jun 24, 2025
7f7a0bc
Copied Full SDK code snippets for release v7.1.0.
ranascanbot Jun 25, 2025
e7c2249
Add workspace
sebastato Jun 27, 2025
03cd251
Update Libraries.txt
sebastato Jun 27, 2025
c9ecc95
Update readme.md
sebastato Jun 27, 2025
58c6630
Update Libraries.txt again
sebastato Jun 27, 2025
b86a358
Copied Full SDK code snippets for release v7.1.0.
scanbot-ci Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 9 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
.DS_Store

ScanbotSDK/
/ClassicComponentsExample.xcodeproj/xcuserdata/
/DataCaptureRTUUIExample.xcodeproj/project.xcworkspace/xcuserdata
/DocumentScannerRTUUIExample.xcodeproj/xcuserdata/
/SwiftUIComponentsExample.xcodeproj/project.xcworkspace/xcuserdata
/ClassicComponent/ClassicComponentsExample.xcodeproj/xcuserdata/
/ClassicComponent/ScanbotSDKOCRData.bundle
/DataCaptureRTUUI/DataCaptureRTUUIExample.xcodeproj/project.xcworkspace/xcshareddata
/DataCaptureRTUUI/DataCaptureRTUUIExample.xcodeproj/xcuserdata
/DataCaptureRTUUI/ScanbotSDKOCRData.bundle
/DocumentRTUUI/DocumentScannerRTUUIExample.xcodeproj/xcuserdata/
/SwiftUI/SwiftUIComponentsExample.xcodeproj/project.xcworkspace/xcuserdata
/SwiftUI/SwiftUIComponentsExample.xcodeproj/xcuserdata
.idea/
*.xcuserstate
DownloadTemp/
/SwiftUIComponentsExample.xcodeproj/xcuserdata
/DataCaptureRTUUIExample.xcodeproj/xcuserdata

DownloadTemp/

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
LastUpgradeVersion = "1620"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array/>
<dict/>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CustomTrackedBarcodeView: UIView, SBSDKTrackedBarcodeInfoViewable {
}

func update(barcodeFrame: CGRect,
isSelected: Bool,
isHighlighted isSelected: Bool,
textStyle: ScanbotSDK.SBSDKBarcodeTrackedViewTextStyle,
polygonStyle: ScanbotSDK.SBSDKBarcodeTrackedViewPolygonStyle) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
<string>6</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NFCReaderUsageDescription</key>
<string>Please allow NFC usage.</string>
<key>NSCameraUsageDescription</key>
<string>"Please allow access to camera"</string>
<key>NSPhotoLibraryUsageDescription</key>
Expand Down

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions ClassicComponentsExample/ClassicComponentsExample.entitlements

This file was deleted.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
version = "1.3">
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand All @@ -14,10 +15,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "08E3396C23E2EC8000699471"
BuildableName = "Download ScanbotSDK"
BlueprintName = "Download ScanbotSDK"
ReferencedContainer = "container:ClassicComponentsExample.xcodeproj">
BlueprintIdentifier = "F164F7692E0AE8EC001F6A5A"
BuildableName = "Copy Bundles"
BlueprintName = "Copy Bundles"
ReferencedContainer = "container:DataCaptureRTUUIExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -26,9 +27,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -50,10 +50,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "08E3396C23E2EC8000699471"
BuildableName = "Download ScanbotSDK"
BlueprintName = "Download ScanbotSDK"
ReferencedContainer = "container:ClassicComponentsExample.xcodeproj">
BlueprintIdentifier = "F164F7692E0AE8EC001F6A5A"
BuildableName = "Copy Bundles"
BlueprintName = "Copy Bundles"
ReferencedContainer = "container:DataCaptureRTUUIExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1610"
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -28,6 +28,18 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6991C598256C2989008188AD"
BuildableName = "DataCaptureRTUUIExampleUITests.xctest"
BlueprintName = "DataCaptureRTUUIExampleUITests"
ReferencedContainer = "container:DataCaptureRTUUIExample.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class MainTableActionHandler: NSObject {

func showCheckScanner() {
guardLicense {
UsecaseScanCheck(result: result).start(presenter: self.presenter)
UsecaseScanCheck().start(presenter: self.presenter)
}
}

Expand Down Expand Up @@ -90,13 +90,17 @@ class MainTableActionHandler: NSObject {

func showIDCardScanner() {
guardLicense {
UsecaseScanDocumentDataExtractor(documentType: .idCardFrontBackDE).start(presenter: self.presenter)
UsecaseScanDocumentDataExtractor(documentTypes: [.deIdCardBack,
.deIdCardFront])
.start(presenter: self.presenter)
}
}

func showDriverLicenseScanner() {
guardLicense {
UsecaseScanDocumentDataExtractor(documentType: .driverLicenseFrontBackDE).start(presenter: self.presenter)
UsecaseScanDocumentDataExtractor(documentTypes: [.europeanDriverLicenseBack,
.europeanDriverLicenseFront])
.start(presenter: self.presenter)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// UsecaseScanVIN.swift
// DataCaptureRTUUIExample
//
// Created by Rana Sohaib on 21.08.23.
// Copyright © 2023 doo GmbH. All rights reserved.
//

import UIKit
import ScanbotSDK

class UsecaseScanVIN: Usecase {
override func start(presenter: UIViewController) {
super.start(presenter: presenter)

let configuration = SBSDKUI2VINScannerScreenConfiguration()

let scanner = SBSDKUI2VINScannerViewController.create(with: configuration) { [weak self] result in
if let result {
guard !result.textResult.rawText.isEmpty || !result.barcodeResult.extractedVIN.isEmpty else {
return
}
let message = result.textResult.rawText + "\n" + result.barcodeResult.extractedVIN
let title = "VIN detected"

UIAlertController.showInfoAlert(title, message: message, presenter: presenter, completion: nil)

} else {
self?.didFinish()
}
}
presentViewController(scanner)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// UsecaseRecognizeCheck.swift
// DataCaptureRTUUIExample
//
// Created by Danil Voitenko on 03.05.22.
// Copyright © 2022 doo GmbH. All rights reserved.
//

import Foundation
import ScanbotSDK

final class UsecaseScanCheck: Usecase {

override func start(presenter: UIViewController) {
super.start(presenter: presenter)

let configuration = SBSDKUI2CheckScannerScreenConfiguration()

let scanner = SBSDKUI2CheckScannerViewController.create(with: configuration) { [weak self] result in
if let result {
let title = "Check found"
var message = "Recognition Status: \(result.recognitionStatus.stringValue)"
let fields = result.check?.fields.compactMap {
"\($0.type.displayText ?? ""): \($0.value?.text ?? "")"
} ?? []
message += "\n" + fields.joined(separator: "\n")

UIAlertController.showInfoAlert(title, message: message, presenter: presenter, completion: nil)

} else {
self?.didFinish()
}
}
presentViewController(scanner)
}
}

extension SBSDKCheckMagneticInkStripScanningStatus {
var stringValue: String {
switch self {
case .success:
return "Success"
case .errorNothingFound:
return "ErrorNothingFound"
case .incompleteValidation:
return "Incomplete"
@unknown default:
return "\(self.rawValue)"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//
// UsecaseScanDocumentDataExtractor.swift
// DataCaptureRTUUIExample
//
// Created by Daniil Voitenko on 18.06.25.
// Copyright © 2025 doo GmbH. All rights reserved.
//

import Foundation
import ScanbotSDK

class UsecaseScanDocumentDataExtractor: Usecase {

let documentTypes: [SBSDKDocumentsModelRootType]

init(documentTypes: [SBSDKDocumentsModelRootType]) {
self.documentTypes = documentTypes
super.init()
}

override func start(presenter: UIViewController) {
super.start(presenter: presenter)

let configuration = SBSDKUI2DocumentDataExtractorScreenConfiguration()
let builder = SBSDKDocumentDataExtractorConfigurationBuilder()
builder.setAcceptedDocumentTypes(documentTypes)

configuration.scannerConfiguration = builder.buildConfiguration()
let extractor = SBSDKUI2DocumentDataExtractorViewController.create(with: configuration) { [weak self] result in
if let result {
let title = "Document Data Extractor Result"
var message = "Recognition Status: \(result.recognitionStatus.stringValue)"

let fields = result.document?.fields.compactMap {
"\($0.type.displayText ?? ""): \($0.value?.text ?? "")"
} ?? []
message += "\n" + fields.joined(separator: "\n")

UIAlertController.showInfoAlert(title,
message: result.description,
presenter: presenter, completion: nil)
} else {
self?.didFinish()
}
}

presentViewController(extractor)
}
}

extension SBSDKDocumentDataExtractionStatus {
var stringValue: String {
switch self {
case .success:
return "Success"
case .errorNothingFound:
return "ErrorNothingFound"
case .incompleteValidation:
return "Incomplete"
default:
return "\(self.rawValue)"
}
}
}

This file was deleted.

Loading