To add our SDK to your own application, you should add it to the build process of your application. Currently we support doing this using CocoaPods or Carthage.
To add the repository to your project, open the Podfile, if it does not exists,
first run pod init in the root of your project with Xcode closed.
Edit the target part of your application in the Podfile, so that it contains
the following, making sure it includes your credentials:
pod 'Klippa-Scanner', podspec: 'https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/latest.podspec'
The full Podfile might look like this now:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'TestScanner' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TestScanner
pod 'Klippa-Scanner', podspec: 'https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/latest.podspec'
end
When you run pod install now, it should download our library as dependency, and with that
all
dependencies of our library.
Note: this code always uses the latest version, you can also use a specific
version to make sure the SDK won't update without your knowledge.
To add the repository to your project, open the Cartfile, if it does not
exists,
create a Cartfile alongside your .xcodeproj or .xcworkspace.
Add the following to your Cartfile, making sure it includes your credentials:
binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json"
When you run carthage update now, it should download our library as dependency, and with
that
all dependencies of our library.
Note: this code always uses the latest version, you can also use a specific
version to make sure the SDK won't update without your knowledge.
As of KlippaScanner SDK Version 2.0.0 the implementation has changed. If you are using an 1.2.2 or earlier use the button below to switch to the original documentation.
To start the scanner, import our package:
// Add to the top of your file
import KlippaScanner
Use the klippaScanner
modifier in your SwiftUI view to present
the scanner. Set isPresented
to true
when you want
to show the scanner, for example in a Button
action.
struct SwiftUIView: View {
@State var isPresented: Bool = false
let license = "your-license"
var body: some View {
VStack {
Button("Start Scanner") {
isPresented = true
}
}
.klippaScanner(isPresented: $isPresented, license: String)
}
}
Make sure to replace "your-license"
with your actual license.
In the klippaScanner
modifier you can implement the methods to
handle the result, error, and cancellation.
// ... Rest of your view code
.klippaScanner(isPresented: $isPresented,
license: license,
klippaScannerDidFinishScanningWithResult: { result in
// Handle scan results here.
print("didFinishScanningWithResult")
print("Scanned \(result.images.count) images")
},
klippaScannerDidFailWithError: { error in
print(error)
},
klippaScannerDidCancel: {
print("Scanner canceled")
})
// ... Rest of your view code
In the controller that you want to launch the scanner, implement the
KlippaScannerDelegate
.
// Add to the top of your file
import KlippaScanner
// Your class definition should look like this.
final class ExampleScannerViewController: UIViewController, KlippaScannerDelegate {
// ... Rest of your controller code.
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
builder.startScanner(parent: self)
// Or
// let viewController = builder.build()
// present(viewController, animated: true)
}
func klippaScannerDidFailWithError(error: Error) {
switch error {
case let licenseError as KlippaScannerLicenseError:
print("Got licensing error from SDK: \(licenseError.localizedDescription)")
default:
print(error)
}
}
func klippaScannerDidFinishScanningWithResult(result: KlippaScannerResult) {
// Handle scan results here.
print("didFinishScanningWithResult")
print("Scanned \(result.images.count) images")
}
func klippaScannerDidCancel() {
print("Scanner canceled")
}
// ... Rest of your controller code.
}
In the place where you want to start the scanner, for example after a button click, call the startKlippaScanner method:
startKlippaScanner()
Use the klippaScanner
modifier in your SwiftUI view to present
the scanner. Set isPresented
to true
when you want
to show the scanner, for example in a Button
action.
struct SwiftUIView: View {
@State var isPresented: Bool = false
let license = "your-license"
var body: some View {
VStack {
Button("Start Scanner") {
isPresented = true
}
}
.klippaScanner(isPresented: $isPresented, license: String)
}
}
Make sure to replace "your-license"
with your actual license.
In the klippaScanner
modifier you can implement the methods to
handle the result, error, and cancellation.
// ... Rest of your view code
.klippaScanner(isPresented: $isPresented,
license: license,
klippaScannerDidFinishScanningWithResult: { result in
// Handle scan results here.
print("didFinishScanningWithResult")
print("Scanned \(result.images.count) images")
},
klippaScannerDidFailWithError: { error in
// Handle scan results here.
print("didFinishScanningWithResult")
print("Scanned \(result.images.count) images")
},
klippaScannerDidCancel: {
print("Scanner canceled")
})
// ... Rest of your view code
In the controller that you want to launch the scanner, implement the
KlippaScannerDelegate
.
// Add to the top of your file
import KlippaScanner
// Your class definition should look like this.
final class ExampleScannerViewController: UIViewController, KlippaScannerDelegate {
// ... Rest of your controller code.
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
builder.startScanner(parent: self)
// Or
// let viewController = builder.build()
// present(viewController, animated: true)
}
func klippaScannerDidFailWithError(error: Error) {
switch error {
case let licenseError as KlippaScannerLicenseError:
print("Got licensing error from SDK: \(licenseError.localizedDescription)")
default:
print(error)
}
}
func klippaScannerDidFinishScanningWithResult(result: KlippaScannerResult) {
// Handle scan results here.
print("didFinishScanningWithResult")
print("Scanned \(result.images.count) images")
}
func klippaScannerDidCancel() {
print("Scanner canceled")
}
// ... Rest of your controller code.
}
In the place where you want to start the scanner, for example after a button click, call the startKlippaScanner method:
startKlippaScanner()
The SDK has a few customizing settings, the following methods are available:
Note: when setting the colors the values should be a UIColor.
let colors = KlippaColors(
// The primary color of the interface. This is used for the app bar.
primaryColor: .green,
// The accent color of the interface. This is used for control elements.
accentColor: .orange,
// The secondary color.
secondaryColor: .gray,
// The color of the background of the warning message.
warningBackgroundColor: .red,
// The color of the text of the warning message.
warningTextColor: .white,
// The overlay color (when using document detection).
overlayColorAlpha: 0.75,
// The color of the menu icons when they are enabled.
iconEnabledColor: .white,
// The color of the menu icons when they are disabled.
iconDisabledColor: .gray,
// The color of the menu icons of the screen where you can edit/crop the images.
buttonWithIconForegroundColor: .white,
// The color of the menu background buttons of the screen where you can edit/crop the images.
buttonWithIconBackgroundColor: .gray,
// What the default color conversion will be (grayscale, original, enhanced).
defaultImageColor: .original)
.klippaScanner(isPresented: $isPresented,
license: license,
colors: colors)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaColors(colors)
builder.startScanner(parent: self)
}
Note: when setting the colors the values should be a UIColor.
let colors = KlippaColors(
// The primary color of the interface. This is used for the app bar.
primaryColor: .green,
// The accent color of the interface. This is used for control elements.
accentColor: .orange,
// The overlay color (when using document detection).
overlayColor: .gray,
// The color of the background of the warning message.
warningBackgroundColor: .red,
// The color of the text of the warning message.
warningTextColor: .white,
// The overlay color (when using document detection).
overlayColorAlpha: 0.75,
// The color of the menu icons when they are enabled.
iconEnabledColor: .white,
// The color of the menu icons when they are disabled.
iconDisabledColor: .gray,
// The color of the menu icons of the screen where you can review/edit the images.
reviewIconColor: .white,
// What the default color conversion will be (grayscale, original, enhanced).
defaultImageColor: .original)
.klippaScanner(isPresented: $isPresented,
license: license,
colors: colors)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaColors(colors)
builder.startScanner(parent: self)
}
let messages = KlippaMessages(
// The warning message when someone should move closer to a document.
moveCloserMessage: "Move closer to the document",
// The warning message when the camera result is too bright.
imageTooBrightMessage: "The image is too bright",
// The warning message when the camera result is too dark.
imageTooDarkMessage: "The image is too dark",
// The warning message when the camera preview has too much motion to be able to automatically take a photo.
imageMovingMessage: "Camera is moving too much",
// The message to display when the limit has been reached.
imageLimitReachedMessage: "You have reached the limit",
// The warning message when device is held in landscape mode.
orientationWarningMessage: "Hold your phone in portrait mode",
// After capture, show a checkmark preview with this success message, instead of a preview of the image.
successMessage: "success",
// The confirmation message shown when the cancel button is pressed on the review screen.
cancelConfirmationMessage: "Delete photos and exit scanner?"),
// The count photos message shown in the camera segmented mode.
segmentedModeImageCountMessage: "Images:"
)
.klippaScanner(isPresented: $isPresented,
license: license,
messages: messages)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaMessages(messages)
builder.startScanner(parent: self)
}
let messages = KlippaMessages(
// The warning message when someone should move closer to a document.
moveCloserMessage: "Move closer to the document",
// The warning message when the camera result is too bright.
imageTooBrightMessage: "The image is too bright",
// The warning message when the camera result is too dark.
imageTooDarkMessage: "The image is too dark",
// The warning message when the camera preview has too much motion to be able to automatically take a photo.
imageMovingMessage: "Camera is moving too much",
// The message to display when the limit has been reached.
imageLimitReachedMessage: "You have reached the limit",
// The warning message when device is held in landscape mode.
orientationWarningMessage: "Hold your phone in portrait mode",
// After capture, show a checkmark preview with this success message, instead of a preview of the image.
successMessage: "success",
// The confirmation message shown when the cancel button is pressed on the review screen.
cancelConfirmationMessage: "Delete photos and exit scanner?")
.klippaScanner(isPresented: $isPresented,
license: license,
messages: messages)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaMessages(messages)
builder.startScanner(parent: self)
}
let buttonTexts = KlippaButtonTexts(
// The text inside of the delete button.
deleteButtonText: "Delete",
// The text inside of the retake button.
retakeButtonText: "Retake",
// The text inside of the cancel button.
cancelButtonText: "Cancel",
// The text inside of the cancel confirmation alert, confirming to cancel the scanner without a result.
cancelAndDeleteImagesButtonText: "Delete photos and exit",
// The text for the original filter on the ActionSheet of the filter button.
imageColorOriginalText: "Original",
// The text for the gray filter on the ActionSheet of the filter button.
imageColorGrayscaleText: "Grayscale",
// The text for the enhanced filter on the ActionSheet of the filter button.
imageColorEnhancedText: "Enhanced",
// The text to finish the scanner on the edit screen.
continueButtonText: "Continue",
// The text inside of the crop button on the edit screen.
cropEditButtonText: "Crop",
// The text inside of the filter button on the edit screen.
filterEditButtonText: "Filter",
// The text inside of the rotate button on the edit screen.
rotateEditButtonText: "Rotate",
// The text inside of the delete button on the edit screen.
deleteEditButtonText: "Delete",
// The text inside of the cancel button on the crop screen.
cancelCropButtonText: "Cancel",
// The text inside of the expand button on the crop screen.
expandCropButtonText: "Expand",
// The text inside of the save button on the crop screen.
saveCropButtonText: "Save"
)
.klippaScanner(isPresented: $isPresented,
license: license,
buttonTexts: buttonTexts)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaButtonTexts(buttonTexts)
builder.startScanner(parent: self)
}
let buttonTexts = KlippaButtonTexts(
// The text inside of the delete button.
deleteButtonText: "Delete",
// The text inside of the retake button.
retakeButtonText: "Retake",
// The text inside of the cancel button.
cancelButtonText: "Cancel",
// The text inside of the cancel confirmation alert, confirming to cancel the scanner without a result.
cancelAndDeleteImagesButtonText: "Delete photos and exit",
// Tapping on the image color-changing button prompts an alert to confirm your action.
// Texts can be set with:
imageColorOriginalText: "Original",
imageColorGrayscaleText: "Grayscale",
imageColorEnhancedText: "Enhanced")
.klippaScanner(isPresented: $isPresented,
license: license,
buttonTexts: buttonTexts)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaButtonTexts(buttonTexts)
builder.startScanner(parent: self)
}
let menu = KlippaMenu(
// Whether the crop mode (auto edge detection) should be enabled by default.
isCropEnabled: false,
// If you would like to enable automatic capturing of images.
isTimerEnabled: false,
// Whether to show the icon to enable timer
allowTimer: true,
// Whether to show the rotate icon in the review screen.
userCanRotateImage: true,
// Whether to show the crop icon in the review screen.
userCanCropManually: true,
// Whether to show the color adjusting icon in the review screen.
userCanChangeColorSetting: true,
// Whether to automatically go to the review screen once the image limit has been reached.
shouldGoToReviewScreenWhenImageLimitReached: false,
// Whether the camera has a view finder overlay (a helper grid so the user knows where the document should be), should be a Boolean.
isViewFinderEnabled: false,
// Whether to allow users to select media from their device (Shows a media button bottom left on the scanner screen).
userCanPickMediaFromStorage: false,
// Whether the user must approve the taken photo before they can continue.
userShouldAcceptResultToContinue: false,
// Whether the next button in the bottom right of the scanner screen goes to the review screen instead of finishing the session.
shouldGoToReviewScreenOnFinishPressed: false
)
.klippaScanner(isPresented: $isPresented,
license: license,
menu: menu)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaMenu(menu)
builder.startScanner(parent: self)
}
let menu = KlippaMenu(
// Whether the crop mode (auto edge detection) should be enabled by default.
isCropEnabled: false,
// Whether to show the icon to enable "multi-document-mode"
allowMultipleDocumentsMode: false,
// Whether the "multi-document-mode" should be enabled by default.
isMultipleDocumentsModeEnabled: true,
// If you would like to enable automatic capturing of images.
isTimerEnabled: false,
// Whether to show the icon to enable timer
allowTimer: true,
// Whether to show the rotate icon in the review screen.
userCanRotateImage: true,
// Whether to show the crop icon in the review screen.
userCanCropManually: true,
// Whether to show the color adjusting icon in the review screen.
userCanChangeColorSetting: true,
// Whether to automatically go to the review screen once the image limit has been reached.
shouldGoToReviewScreenWhenImageLimitReached: false,
// Whether the camera has a view finder overlay (a helper grid so the user knows where the document should be), should be a Boolean.
isViewFinderEnabled: false)
.klippaScanner(isPresented: $isPresented,
license: license,
menu: menu)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaMenu(menu)
builder.startScanner(parent: self)
}
let imageAttributes = KlippaImageAttributes(
imageLimit: 2,
// Define the max resolution of the output file.
// It’s possible to set only one of these values.
// We will make sure the picture fits in the given resolution.
// We will also keep the aspect ratio of the image. Default is max resolution of camera.
imageMaxWidth: 3000,
imageMaxHeight: 3000,
// Set the output quality (between 0-100) of the jpg encoder. Default is 100.
imageMaxQuality: 95,
// The threshold sensitive the motion detection is. (lower value is higher sensitivity, default 200).
imageMovingSensitivity: 200,
// To add extra horizontal and / or vertical padding to the cropped image.
cropPadding: CGSize(width: 100, height: 100),
// Whether the camera automatically saves the images to the camera roll. Default true.
storeImagesToCameraRoll: false,
// Whether to perform OCR (on device) on the images taken.
performOnDeviceOCR: false,
// The lower threshold before the warning message informs the environment is too dark.
brightnessLowerThreshold: 0,
// The upper threshold before the warning message informs the environment is too bright.
brightnessUpperThreshold: 6,
// The file format of the output file.
// Supports:
// - `jpeg` JPEG file format (Default)
// - `pdfMerged` Merges all photos with the same groupId into a single PDF
// - `pdfSingle` Puts each photo into separate PDFs
outputFormat: OutputFormat.jpeg
)
.klippaScanner(isPresented: $isPresented,
license: license,
imageAttributes: imageAttributes)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaImageAttributes(imageAttributes)
builder.startScanner(parent: self)
}
let imageAttributes = KlippaImageAttributes(
imageLimit: 2,
// Define the max resolution of the output file.
// It’s possible to set only one of these values.
// We will make sure the picture fits in the given resolution.
// We will also keep the aspect ratio of the image. Default is max resolution of camera.
imageMaxWidth: 3000,
imageMaxHeight: 3000,
// Set the output quality (between 0-100) of the jpg encoder. Default is 100.
imageMaxQuality: 95,
// The threshold sensitive the motion detection is. (lower value is higher sensitivity, default 200).
imageMovingSensitivity: 200,
// To add extra horizontal and / or vertical padding to the cropped image.
cropPadding: CGSize(width: 100, height: 100),
// Whether the camera automatically saves the images to the camera roll. Default true.
storeImagesToCameraRoll: false)
.klippaScanner(isPresented: $isPresented,
license: license,
imageAttributes: imageAttributes)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaImageAttributes(imageAttributes)
builder.startScanner(parent: self)
}
let shutterButton = KlippaShutterButton(
// Whether to allow the shutter button. (If false the shutter button is greyed out)
allowShutterButton: true,
// Whether to hide the shutter button. (Only works if allowShutterButton is false)
hideShutterButton: false)
.klippaScanner(isPresented: $isPresented,
license: license,
shutterButton: shutterButton)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaShutterbutton(shutterButton)
builder.startScanner(parent: self)
}
let shutterButton = KlippaShutterButton(
// Whether to allow the shutter button. (If false the shutter button is greyed out)
allowShutterButton: true,
// Whether to hide the shutter button. (Only works if allowShutterButton is false)
hideShutterButton: false)
.klippaScanner(isPresented: $isPresented,
license: license,
shutterButton: shutterButton)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaShutterbutton(shutterButton)
builder.startScanner(parent: self)
}
let durations = KlippaDurations(
// The amount of seconds the preview should be visible for, should be a float.
previewDuration: 2.0,
// The duration of the timer. (Only works if timer is enabled)
timerDuration: 1.0,
// Whether to show a success checkmark and how long.
successPreviewDuration: 0.5)
.klippaScanner(isPresented: $isPresented,
license: license,
durations: durations)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaDurations(durations)
builder.startScanner(parent: self)
}
let durations = KlippaDurations(
// The amount of seconds the preview should be visible for, should be a float.
previewDuration: 2.0,
// The duration of the timer. (Only works if timer is enabled)
timerDuration: 1.0,
// Whether to show a success checkmark and how long.
successPreviewDuration: 0.5)
.klippaScanner(isPresented: $isPresented,
license: license,
durations: durations)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaDurations(durations)
builder.startScanner(parent: self)
}
The SDK supports three camera modes: KlippaSingleDocumentMode, KlippaMultipleDocumentMode
and KlippaSegmentedDocumentMode:
KlippaSingleDocumentMode is used for scanning a single-page document.
KlippaMultipleDocumentMode is used for scanning a document that consists of multiple pages.
KlippaSegmentedDocumentMode is used for scanning a single-page document with multiple photo
captures. The photos are stitched together to create a single long document.
Suitable for scanning long receipts.
Each comes with its own set of instructions which can be customized and if nil is supplied then no instructions are shown.
The SDK starts with KlippaSingleDocumentMode as default. Not all modes are required, the SDK
allows to
leave out the undesired camera modes as long as there is a minimum of 1 camera mode.
let cameraModes = KlippaCameraModes(
modes: [
// The document mode for scanning a single-page document.
KlippaSingleDocumentMode(
name: "Single",
// passing instructions is optional, if none are passed the default instructions are shown.
instructions: Instructions(
title: "Single Document",
message: "Single Document Instructions",
image: "image-name-in-bundle" // passing an image is optional, if none is passed the default will show.
)
),
// The document mode for scanning a document which consists of multiple pages.
KlippaMultipleDocumentMode(
name: "Multiple",
// passing instructions is optional, if none are passed the default instructions are shown.
instructions: Instructions(
title: "Multiple Documents",
message: "Multiple Documents Instructions",
image: "image-name-in-bundle" // passing an image is optional, if none is passed the default will show.
)
),
// The document mode for scanning a single-page document with multiple photo captures. Suitable for scanning long receipts.
KlippaSegmentedDocumentMode(
name: "Segmented",
// passing instructions is optional, if none are passed the default instructions are shown.
instructions: Instructions(
title: "Segmented Document",
message: "Segmented Document Instructions",
image: "image-name-in-bundle" // passing an image is optional, if none is passed the default will show.
)
)
],
startingIndex: 0
)
.klippaScanner(isPresented: $isPresented,
license: license,
cameraModes: cameraModes)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaCameraModes(cameraModes)
builder.startScanner(parent: self)
}
let cameraModes = KlippaCameraModes(
modes: [
// The document mode for scanning a single-page document.
KlippaSingleDocumentMode(
name: "Single Document",
instructions: Instructions(
message: "Single Document Instructions",
dismissHandler: {
print("Single document mode instructions dismissed.")
})
),
// The document mode for scanning a document which consists of multiple pages.
KlippaMultipleDocumentMode(
name: "Multiple Document",
instructions: Instructions(
message: "Multiple Document Instructions",
dismissHandler: {
print("Multiple document mode instructions dismissed.")
})
),
// The document mode for scanning a single-page document with multiple photo captures. Suitable for scanning long receipts.
KlippaSegmentedDocumentMode(
name: "Segmented Document",
instructions: Instructions(
message: "Segmented Document Instructions",
dismissHandler: {
print("Segmented document mode instructions dismissed.")
})
)
],
// The index to set which camera mode will be shown as default.
startingIndex: 0
)
.klippaScanner(isPresented: $isPresented,
license: license,
cameraModes: cameraModes)
// Call this from a button
func startKlippaScanner() {
let license = "{your-license}"
let builder = KlippaScannerBuilder(builderDelegate: self, license: license)
.klippaCameraModes(cameraModes)
builder.startScanner(parent: self)
}
It's possible to use the results of the scanner with the OCR API.
For instructions, please visit the documentation
page.
The dependency download size itself is 15.2MB when extracted, but it contains builds for multiple architectures, it depends on the architecture of the phone how much the SDK is going to add to the app size:
Include the NSCameraUsageDescription key in your app's Info.plist file.
Name Privacy - Camera Usage Description
<key>NSCameraUsageDescription</key>
<string>In order to scan documents, we need access to your camera.</string>
Saving scans to the user's photo library, include the NSPhotoLibraryAddUsageDescription key in your app's Info.plist file.
Name Privacy - Photo Library Additions Usage Description
<key>NSPhotoLibraryAddUsageDescription</key>
<string>In order to save scans we need access to your photos.</string>
All of the scans taken are stored on the device. To remove the scans we added a helper method to do so. After a session is completed, or periodically you can purge the storage to remove all local taken scans of the device. We store the files in the temp storage bucket so iOS may also periodically clear this for you.
// Clears all files from the temp "Scanner" folder.
KlippaScannerStorage.purge()
Sandbox Issue
In case you encounter issues related to the Sandbox, you can disable the ENABLE_USER_SCRIPT_SANDBOXING
by following these steps:
The following versions are available:
Version | Podspec include URL | Cartfile dependency | Binary download |
---|---|---|---|
2.0.9 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.9.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.9 | Fat framework (.xcarchive) | XCFramework |
2.0.8 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.8.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.8 | Fat framework (.xcarchive) | XCFramework |
2.0.7 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.7.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.7 | Fat framework (.xcarchive) | XCFramework |
2.0.6 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.6.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.6 | Fat framework (.xcarchive) | XCFramework |
2.0.5 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.5.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.5 | Fat framework (.xcarchive) | XCFramework |
2.0.4 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.4.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.4 | Fat framework (.xcarchive) | XCFramework |
2.0.3 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.3.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.3 | Fat framework (.xcarchive) | XCFramework |
2.0.2 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.2.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.2 | Fat framework (.xcarchive) | XCFramework |
2.0.1 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.1.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.1 | Fat framework (.xcarchive) | XCFramework |
2.0.0 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/2.0.0.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 2.0.0 | Fat framework (.xcarchive) | XCFramework |
1.2.2 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/1.2.2.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 1.2.2 | Fat framework (.xcarchive) | XCFramework |
1.2.1 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/1.2.1.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 1.2.1 | Fat framework (.xcarchive) | XCFramework |
1.2.0 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/1.2.0.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 1.2.0 | Fat framework (.xcarchive) | XCFramework |
1.1.0 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/1.1.0.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 1.1.0 | Fat framework (.xcarchive) | XCFramework |
1.0.0 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/1.0.0.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 1.0.0 | Fat framework (.xcarchive) | XCFramework |
0.5.4 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.5.4.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.5.4 | Fat framework (.xcarchive) | XCFramework |
0.5.3 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.5.3.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.5.3 | Fat framework (.xcarchive) | XCFramework |
0.5.2 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.5.2.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.5.2 | Fat framework (.xcarchive) | XCFramework |
0.5.1 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.5.1.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.5.1 | Fat framework (.xcarchive) | XCFramework |
0.5.0 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.5.0.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.5.0 | Fat framework (.xcarchive) | XCFramework |
0.4.12 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.12.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.12 | Fat framework (.xcarchive) | XCFramework |
0.4.11 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.11.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.11 | Fat framework (.xcarchive) | XCFramework |
0.4.10 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.10.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.10 | Fat framework (.xcarchive) | XCFramework |
0.4.9 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.9.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.9 | Fat framework (.xcarchive) | XCFramework |
0.4.8 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.8.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.8 | Fat framework (.xcarchive) | XCFramework |
0.4.7 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.7.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.7 | Fat framework (.xcarchive) | XCFramework |
0.4.6 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.6.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.6 | Fat framework (.xcarchive) | XCFramework |
0.4.5 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.5.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.5 | Fat framework (.xcarchive) | XCFramework |
0.4.4 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.4.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.4 | Fat framework (.xcarchive) | XCFramework |
0.4.3 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.3.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.3 | Fat framework (.xcarchive) | XCFramework |
0.4.2 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.4.2.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.4.2 | Fat framework (.xcarchive) | XCFramework |
0.3.4 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.3.4.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.3.4 | Fat framework (.xcarchive) | XCFramework |
0.3.3 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.3.3.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.3.3 | Fat framework (.xcarchive) | XCFramework |
0.3.2 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.3.2.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.3.2 | Fat framework (.xcarchive) | XCFramework |
0.3.1 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.3.1.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.3.1 | Fat framework (.xcarchive) | XCFramework |
0.3.0 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.3.0.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.3.0 | Fat framework (.xcarchive) | XCFramework |
0.2.0 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.2.0.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.2.0 | Fat framework (.xcarchive) | XCFramework |
0.1.4 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.1.4.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.1.4 | Fat framework (.xcarchive) | XCFramework |
0.1.3 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.1.3.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.1.3 | Fat framework (.xcarchive) | XCFramework |
0.1.2 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.1.2.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.1.2 | Fat framework (.xcarchive) | XCFramework |
0.1.1 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.1.1.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.1.1 | Fat framework (.xcarchive) | XCFramework |
0.1.0 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.1.0.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.1.0 | Fat framework (.xcarchive) | XCFramework |
0.0.14 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.14.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.14 | Fat framework (.xcarchive) | XCFramework |
0.0.13 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.13.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.13 | Fat framework (.xcarchive) | XCFramework |
0.0.12 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.12.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.12 | Fat framework (.xcarchive) | XCFramework |
0.0.11 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.11.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.11 | Fat framework (.xcarchive) | XCFramework |
0.0.10 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.10.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.10 | Fat framework (.xcarchive) | XCFramework |
0.0.8 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.8.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.8 | Fat framework (.xcarchive) | XCFramework |
0.0.7 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.7.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.7 | Fat framework (.xcarchive) | XCFramework |
0.0.6 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.6.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.6 | Fat framework (.xcarchive) | XCFramework |
0.0.5 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.5.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.5 | Fat framework (.xcarchive) | XCFramework |
0.0.4 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.4.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.4 | Fat framework (.xcarchive) | XCFramework |
0.0.2 | https://custom-ocr.klippa.com/sdk/ios/specrepo/ExampleUsername/ExamplePassword/KlippaScanner/0.0.2.podspec | binary "https://custom-ocr.klippa.com/sdk/ios/carthage/ExampleUsername/ExamplePassword/KlippaScanner.json" == 0.0.2 | Fat framework (.xcarchive) | XCFramework |
outputFormat
of type OutputFormat
to KlippaImageAttributes
which offers the ability to switch the output format. Default is OutputFormat.jpeg
.purge()
to KlippaScannerStorage
which offers the ability to clear the local storage of all taken scans.groupId
was not always being set correctly.userShouldAcceptResultToContinue
to KlippaMenu
which when enabled forces users to confirm the photo they took before they can continue.userCanPickMediaFromStorage
button was always visible in KlippaSegmentedDocumentMode
.Objective-C
support.userCanPickMediaFromStorage
to KlippaMenu
which allows users to pick images from storage instead of using the camera.objc
annotations to KlippaSingleDocumentMode
, KlippaMultipleDocumentMode
and KlippaSegmentedDocumentMode
for support for calling the SDK from Objective-C
.brightnessLowerThreshold
and brightnessUpperThreshold
to KlippaImageAttributes
to configure the upper and lower thresholds of the brightness sensitvity.shouldGoToReviewScreenOnFinishPressed
to KlippaMenu
which allows users to go to the Review Screen
when tapping the finish button.icon
to image
in Instructions
.Instructions
.dismissHandler
from Instructions
, and added dismissedInstructions
to KlippaScannerResult
.NOTE: This version introduces breaking changes. Please consult our documentation for information on the new implementation.
overlayColor
in KlippaColors to secondaryColor
.reviewIconColor
in KlippaColors to buttonWithIconForegroundColor
and buttonWithIconBackgroundColor
.buttonWithIconForegroundColor
and buttonWithIconBackgroundColor
to KlippaColors to change the color buttons that contain an icon.segmentedModeImageCountMessage
to KlippaMessages to display the count of photos in the camera’s segmented mode.cropEditButtonText
, filterEditButtonText
, rotateEditButtonText
, and deleteEditButtonText
to KlippaButtonTexts for customizing the labels of buttons on the Edit screen.cancelCropButtonText
, expandCropButtonText
, and saveCropButtonText
to KlippaButtonTexts for customizing the labels of buttons on the Crop screen.reviewIconColor
from KlippaColors.klippaScanner
View which can be used to call the KlippaScanner SDK from SwiftUI.KlippaCameraModes
which is used to setup what camera modes the user can pick from, optionally supply it with an startingIndex
to preselect a camera mode.KlippaSingleDocumentMode
, KlippaMultipleDocumentMode
, KlippaSegmentedDocumentMode
.groupId
to KlippaImage
; KlippaSingleDocumentMode
adds the same groupId
for each photo, KlippaMultipleDocumentMode
and KlippaSegmentedDocumentMode
add a unique groupId
for each photo.name
.Instructions
.klippaCameraModes
to KlippaScannerBuilder
, which can be used to setup different KlippaCameraModes
.startScanner(context: UIViewController)
has become deprecated; please use startScanner(parent: UIViewController)
instead.build()
now returns Result<UIViewController, KlippaError>
instead of only UIViewController
.rawStrings
in KlippaImage
has become deprecated; please use detectedText
instead.KlippaScannerControllerError.capture
.noAllowedPackageNames
error message.NOTE: This version introduces breaking changes, please see our documentation for new implementation.
KlippaScannerBuilder
.KlippaScannerDelegate
.10.0
to 11.0
.10.0
to 11.0
.imageColorMode
. Possible options are: .original
, .grayscale
, .enhanced
.imageColorOriginalText
, imageColorGrayscaleText
, imageColorEnhancedText
.doesUserPreferEnhancedScan
you can use imageColorMode
instead.orientationWarningMessage
.shouldGoToReviewScreenWhenImageLimitReached
(default false).userCanRotateImage
, userCanCropManually
, userCanChangeColorSetting
accordingly (each default true).deleteButtonText
, retakeButtonText
, cancelButtonText
.cancelAndDeleteImagesButtonText
, cancelConfirmationMessage
.1000
to 3000
.imageMovingMessage
only shows when we have detected an object.imageLimit
and set a message once limit has been reached with imageLimitReachedMessage
.KlippaScanner.setup.set(allowTimer: false)
KlippaScanner.setup.set(allowShutterButton: false, hideShutterButton: false)
KlippaScanner.setup.set(imageMovingSensitivity: 200)
KlippaScanner.setup.set(imageMovingMessage: "Too much movement")
KlippaScanner.setup.set(storeImagesToCameraRoll: false)
.retrieve(path: "pathToImage", from directory: .documents, as type: UIImage.self)
to retrieve image from provided path.KlippaScanner.setup.set(modelName: "model", modelLabelsName: "labels", modelBundleLocation: ViewController.self)
KlippaScanner.setup.set(isTimerEnabled: true)
and KlippaScanner.setup.set(timerDuration: 0.5)
KlippaScanner.setup.set(successMessage: "Success!", successPreviewDuration: 0.3)
KlippaScanner.setup.set(cropPadding: CGSize(width: 200, height: 200))
(this example adds 100px cropping to the left, right, top and bottom of the image).ImageScannerResult
object returned in didFinishScanningWithResult
now also contains the cropEnabled
variable, indicating the status of the crop button.imageScannerControllerDidCancel
on the delegate.isMultipleDocumentsModeEnabled
option has been added to make a distinction between the multiple documents mode being available at all, and the user toggling the button. allowMultipleDocumentsMode
now displays / hides the button whilst isMultipleDocumentsModeEnabled
toggles the initial state when the button is visible.primaryColor
is now used for the toolbar.accentColor
is used for controls.overlayColor
is used for both the area that will be cropped and the cropping controls.isAutoScanEnabled
and isAutoScanEnabled
options have been removed.isCropEnabled
option.allowMultipleDocumentsMode
was being ignored.ImageScannerController
.ImageScannerControllerDelegate
now finishes scanning with one object (ImageScannerResult
), containing the captured images and the multipleDocumentsModeEnabled
property.imageTooDarkMessage
, imageTooBrightMessage
).11.0
to 10.0
.11.0
to 10.0
.allowMultipleDocumentsMode
in KlippaScanner
).imageMaxWidth
, imageMaxHeight
and imageMaxQuality
in KlippaScanner
).warningTextColor
in KlippaScanner
).path
property in KlippaImage
).11.2
to 11.0
.