Skip to content

Commit

Permalink
Release version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Team Mobile Schorsch committed Nov 17, 2021
1 parent 58c7a7f commit 0045174
Show file tree
Hide file tree
Showing 37 changed files with 262 additions and 195 deletions.
1 change: 1 addition & 0 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ custom_categories:
- QR Code scanning guide
- Event tracking guide
- Error logging guide
- Migration guide

- name: Classes
children:
Expand Down
4 changes: 1 addition & 3 deletions Documentation/source/Customization guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ The Gini Capture SDK components can be customized either through the `GiniConfig

## Supporting dark mode

Some background and text colors use the `GiniColor` type with which you can set colors for dark and light modes. Please make sure to set contrasting images to the background colors in your `.xcassets` for the Gini Vision Library images you override (e.g. `onboardingPage1`). The text colors should also be set in contrast to the background colors.
Some background and text colors use the `GiniColor` type with which you can set colors for dark and light modes. Please make sure to set contrasting images to the background colors in your `.xcassets` for the Gini Capture SDK images you override (e.g. `onboardingPage1`). The text colors should also be set in contrast to the background colors.

## Generic components

`GiniConfiguration.backgroundColor` is deprecated in version 5.5.0. Use the screen specific background color instead e.g. `GiniConfiguration.onboardingScreenBackgroundColor`.

##### 1. Navigation bar
<center><img src="img/Customization guide/Navigation bar.jpg" height="70"/></center>
Expand Down
2 changes: 1 addition & 1 deletion Documentation/source/Error logging guide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Error Logging
=============================

The Gini Capture SDK logs errors to the Gini Pay API when the default networking implementation is used (see the UI with Networking (Recommended) section in Integration guide). We log only non-sensitive information like response status codes, headers and error messsages.
The Gini Capture SDK logs errors to the Gini Bank API when the default networking implementation is used (see the UI with Networking (Recommended) section in Integration guide). We log only non-sensitive information like response status codes, headers and error messsages.

You can disable the default error logging by passing false to `GiniConfiguration().giniErrorLoggerIsOn`.

Expand Down
8 changes: 4 additions & 4 deletions Documentation/source/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Gini Capture SDK can either be installed by using Swift Package Manager or by ma
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code.
Once you have your Swift package set up, adding `GiniCaptureSDK` as a dependency is as easy as adding it to the dependencies value of your `Package.swift`

```swif
```swift
dependencies: [
.package(url: "https://github.com/gini/capture-sdk-ios.git", .exact("1.0.0"))
.package(url: "https://github.com/gini/capture-sdk-ios.git", .exact("1.1.0"))
]
```

In case that you want to use the certificate pinning in the library, add `GiniCaptureSDKPinning`:
```swif
```swift
dependencies: [
.package(url: "https://github.com/gini/capture-sdk-pinning-ios.git", .exact("1.0.0"))
.package(url: "https://github.com/gini/capture-sdk-pinning-ios.git", .exact("1.1.0"))
]
```

Expand Down
8 changes: 4 additions & 4 deletions Documentation/source/Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ let viewController = GiniCapture.viewController(withClient: client,

present(viewController, animated: true, completion:nil)
```
**Note**: Starting from Gini Capture SDK version 1.0.6 the pinning certification we suppo**iOS 12**
**Note**: Starting from Gini Capture SDK version 1.0.6 certificate pinning requires **iOS 12**.

> ⚠️ **Important**
> - The document metadata for the upload process is intended to be used for reporting.
Expand Down Expand Up @@ -95,9 +95,9 @@ The components that can be found in the SDK are:

## Sending Feedback

Your app should send feedback for the extractions the Gini Pay API delivered. Feedback should be sent only for the extractions the user has seen and accepted (or corrected).
Your app should send feedback for the extractions the Gini Bank API delivered. Feedback should be sent only for the extractions the user has seen and accepted (or corrected).

For additional information about feedback see the [Gini Pay API documentation](https://pay-api.gini.net/documentation/#send-feedback-and-get-even-better-extractions-next-time).
For additional information about feedback see the [Gini Bank API documentation](https://pay-api.gini.net/documentation/#send-feedback-and-get-even-better-extractions-next-time).

### Default Implementation

Expand Down Expand Up @@ -127,6 +127,6 @@ sendFeedbackBlock(updatedExtractions)
```
### Custom Implementation

If you use your own networking implementation and directly communicate with the Gini Pay API then see [this section](https://pay-api.gini.net/documentation/#submitting-feedback-on-extractions) in its documentation on how to send feedback.
If you use your own networking implementation and directly communicate with the Gini Bank API then see [this section](https://pay-api.gini.net/documentation/#submitting-feedback-on-extractions) in its documentation on how to send feedback.

In case you use the [Gini Bank API Library](https://developer.gini.net/gini-mobile-ios/GiniBankAPILibrary/) then see [this section](https://developer.gini.net/gini-mobile-ios/GiniBankAPILibrary/getting-started.html) in its documentation for details.
48 changes: 46 additions & 2 deletions Documentation/source/License.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
License
=======

The Gini Capture SDK for iOS is licensed under a Private License.
The [Gini Capture SDK for iOS](https://github.com/gini/capture-sdk-ios) is licensed under a Private License.

Always make sure to ship all license notices and permissions with your application.

Expand All @@ -21,7 +21,7 @@ Always make sure to ship all license notices and permissions with your applicati

The Gini Capture SDK uses code from the following libraries:

## [Gini Pay Api Library](https://github.com/gini/gini-pay-api-lib-ios)
## [Gini Bank API Library for iOS](https://github.com/gini/bank-api-library-ios)

The MIT License (MIT)

Expand All @@ -45,6 +45,50 @@ The Gini Capture SDK uses code from the following libraries:
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

The [Gini Capture SDK Pinning for iOS](https://github.com/gini/capture-sdk-pinning-ios) is licensed under a Private License.

Always make sure to ship all license notices and permissions with your application.

Copyright (c) 2014-2021, Gini GmbH
All rights reserved.

The Gini Capture SDK is licensed through Gini GmbH ("Gini") and may not be
used, altered or copied in any way without explicit permission by Gini. The
terms of usage are defined in a separate usage agreement between Gini and the
licensee, where the licensee can gain access to a non-exclusive,
non-transferable usage right which is restricted for the time of a contractual
relationship between Gini and the licensee.

For license related inquiries contact Gini via the email address
[email protected].


The Gini Capture SDK Pinning uses code from the following libraries:

## [Gini Bank API Library Pinning for iOS](https://github.com/gini/bank-api-library-pinning-ios)

The MIT License (MIT)

Copyright (c) 2014 - 2021 Gini GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

## [TrustKit](https://github.com/datatheorem/TrustKit)

The MIT License (MIT)
Expand Down
4 changes: 4 additions & 0 deletions Documentation/source/Migration guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Migrate from the old Gini Capture SDK
=====================================

We've migrated from CocoaPods to Swift Package Manager. Please, find more details in [Installation](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/installation.html).
2 changes: 1 addition & 1 deletion Documentation/source/Open with guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ func application(_ app: UIApplication,
### Documentation

- [AppDelegate resource handling](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623112-application) from _Apple Documentation_
- [Supported file formats](http://developer.gini.net/gini-api/html/documents.html#supported-file-formats) from _Gini API_
- [Supported file formats](https://pay-api.gini.net/documentation/#supported-file-formats) from _Gini Bank API_
6 changes: 1 addition & 5 deletions Documentation/source/QR Code scanning guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ Handle and process the Payment Data
Once the QR code has been detected and the user has tapped the button to use it, the payment data is returned and ready to be analyzed in the API. In order to handle the Payment Data from the QR code, on one hand if you are using the _Screen API_ the `GiniQRCodeDocument` is received in the delegate method `GiniCaptureDelegate.didCapture(document:)`, where it must be sent to the API as though it was an image or a pdf.
On the other hand if you are using the _Component API_, you will get the `GiniQRCodeDocument` in the `CameraScreenSuccessBlock`, where it also must be sent to the API as if it was an image or a pdf.

#### Note:
---
If you are using the [Gini API SDK](https://github.com/gini/gini-sdk-ios) to send the documents to the Gini API, you have to update to `0.5.2` in order to analyze the QR Codes.

Customization
----------------------
It is possible to customize the text label, button and background colors with these parameters:
Expand All @@ -42,7 +38,7 @@ Supported QR codes
----------------------

The supported QR codes are:
- [BezahlCode](http://www.bezahlcode.de)
- BezahlCode
- [EPC069-12](https://www.europeanpaymentscouncil.eu/document-library/guidance-documents/quick-response-code-guidelines-enable-data-capture-initiation)
- [Stuzza (AT)](https://www.stuzza.at/de/zahlungsverkehr/qr-code.html)
- [GiroCode (DE)](https://www.girocode.de/rechnungsempfaenger/)
56 changes: 47 additions & 9 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,12 +1,50 @@
Copyright (c) 2014-2021, Gini GmbH
All rights reserved.

The Gini Capture SDK is licensed through Gini GmbH ("Gini") and may not be
used, altered or copied in any way without explicit permission by Gini. The
terms of usage are defined in a separate usage agreement between Gini and the
licensee, where the licensee can gain access to a non-exclusive,
non-transferable usage right which is restricted for the time of a contractual
relationship between Gini and the licensee.

For license related inquiries contact Gini via the email address
[email protected].
License
=======

The [Gini Capture SDK for iOS](https://github.com/gini/capture-sdk-ios) is licensed under a Private License.

Always make sure to ship all license notices and permissions with your application.

Copyright (c) 2014-2021, Gini GmbH
All rights reserved.

The Gini Capture SDK is licensed through Gini GmbH ("Gini") and may not be
used, altered or copied in any way without explicit permission by Gini. The
terms of usage are defined in a separate usage agreement between Gini and the
licensee, where the licensee can gain access to a non-exclusive,
non-transferable usage right which is restricted for the time of a contractual
relationship between Gini and the licensee.

For license related inquiries contact Gini via the email address
[email protected].


The Gini Capture SDK uses code from the following libraries:

## [Gini Bank API Library for iOS](https://github.com/gini/bank-api-library-ios)

The MIT License (MIT)

Copyright (c) 2014 - 2021 Gini GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "GiniBankAPILibrary", url: "https://github.com/gini/bank-api-library-ios.git", .exact("0.0.1")),
.package(name: "GiniBankAPILibrary", url: "https://github.com/gini/bank-api-library-ios.git", .exact("1.0.0")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Platform](https://img.shields.io/badge/platform-iOS-lightgrey.svg)]()
[![Devices](https://img.shields.io/badge/devices-iPhone%20%7C%20iPad-blue.svg)]()
[![Swift version](https://img.shields.io/badge/swift-5.0-orange.svg)]()
[![Swift package manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)]()


The Gini Capture SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips.
Expand Down
2 changes: 1 addition & 1 deletion Sources/GiniCaptureSDK/Core/GiniCapture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public typealias GiniCaptureNetworkDelegate = AnalysisDelegate & UploadDelegate
The Gini Capture SDK provides views for capturing, reviewing and analysing documents.

By integrating this library in your application you can allow your users to easily take a picture of
a document, review it and - by implementing the necessary callbacks - upload the document for analysis to the Gini API.
a document, review it and - by implementing the necessary callbacks - upload the document for analysis to the Gini Bank API.

The Gini Capture SDK can be integrated in two ways, either by using the **Screen API** or
the **Component API**. The Screen API provides a fully pre-configured navigation controller for
Expand Down
2 changes: 1 addition & 1 deletion Sources/GiniCaptureSDK/Core/Helpers/GiniCaptureUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public func UIImageNamedPreferred(named name: String) -> UIImage? {

- returns: String resource for the given key.
*/
func NSLocalizedStringPreferredFormat(_ key: String,
public func NSLocalizedStringPreferredFormat(_ key: String,
fallbackKey: String = "",
comment: String,
isCustomizable: Bool = true) -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GiniPreferredButtonResource: PreferredButtonResource {
private let localizedTextComment: String?
private let localizedConfigEntry: String?
private let appBundle = Bundle.main
private let libBundle = Bundle(for: GiniCapture.self)
private let libBundle = Bundle.module
private var imageSource: ResourceOrigin {
if let name = imageName {
if UIImage(named: name, in: appBundle, compatibleWith: nil) != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ import UIKit
self.view.addSubview(imageView)
imageView.translatesAutoresizingMaskIntoConstraints = false

Constraints.active(item: imageView, attr: .top, relatedBy: .equal, to: self.topLayoutGuide, attr: .bottom,
Constraints.active(item: imageView, attr: .top, relatedBy: .equal, to: view.safeAreaLayoutGuide, attr: .top,
priority: 999)
Constraints.active(item: imageView, attr: .bottom, relatedBy: .equal, to: self.bottomLayoutGuide, attr: .top,
Constraints.active(item: imageView, attr: .bottom, relatedBy: .equal, to: view.safeAreaLayoutGuide, attr: .bottom,
priority: 999)
Constraints.active(item: imageView, attr: .trailing, relatedBy: .equal, to: self.view, attr: .trailing)
Constraints.active(item: imageView, attr: .leading, relatedBy: .equal, to: self.view, attr: .leading)
Expand Down Expand Up @@ -288,7 +288,7 @@ import UIKit

fileprivate func showCaptureSuggestions(giniConfiguration: GiniConfiguration) {
let captureSuggestions = CaptureSuggestionsView(superView: self.view,
bottomLayout: bottomLayoutGuide,
bottomAnchor: view.safeAreaLayoutGuide.bottomAnchor,
font: giniConfiguration.customFont.with(weight: .regular,
size: 16,
style: .body))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,21 @@ final class CaptureSuggestionsView: UIView {
fileprivate var itemSeparationConstraint: NSLayoutConstraint = NSLayoutConstraint()
fileprivate var bottomConstraint: NSLayoutConstraint = NSLayoutConstraint()
fileprivate let repeatInterval: TimeInterval = 5
fileprivate let superViewBottomLayout: UILayoutSupport
fileprivate let superViewBottomAnchor: NSLayoutYAxisAnchor
fileprivate let suggestionIconImage = UIImage(named: "analysisSuggestionsIcon",
in: Bundle(for: GiniCapture.self),
compatibleWith: nil)
in: Bundle.module, compatibleWith: nil)
fileprivate var suggestionTexts: [String] = [
.localized(resource: AnalysisStrings.suggestion1Text),
.localized(resource: AnalysisStrings.suggestion2Text),
.localized(resource: AnalysisStrings.suggestion3Text),
.localized(resource: AnalysisStrings.suggestion4Text)
]

init(superView: UIView, bottomLayout: UILayoutSupport, font: UIFont) {
init(superView: UIView, bottomAnchor: NSLayoutYAxisAnchor, font: UIFont) {
suggestionContainer = UIView()
suggestionTitle = UILabel()
suggestionText = UILabel()
superViewBottomLayout = bottomLayout
superViewBottomAnchor = bottomAnchor

suggestionIcon = UIImageView(image: suggestionIconImage)
suggestionIcon.contentMode = .scaleAspectFit
Expand Down Expand Up @@ -85,9 +84,7 @@ final class CaptureSuggestionsView: UIView {
guard let superview = superview else { return }

// self
bottomConstraint = NSLayoutConstraint(item: self, attribute: .bottom, relatedBy: .equal,
toItem: superViewBottomLayout, attribute: .top, multiplier: 1,
constant: containerHeight)
bottomConstraint = self.bottomAnchor.constraint(equalTo: superViewBottomAnchor, constant: containerHeight)
Constraints.active(item: self, attr: .leading, relatedBy: .equal, to: superview, attr: .leading)
Constraints.active(item: self, attr: .trailing, relatedBy: .equal, to: superview, attr: .trailing)
Constraints.active(item: self, attr: .height, relatedBy: .equal, to: nil, attr: .notAnAttribute,
Expand Down
1 change: 0 additions & 1 deletion Sources/GiniCaptureSDK/Core/Screens/Camera/Camera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ extension Camera: AVCapturePhotoCaptureDelegate {
didCaptureImageHandler?(imageData, nil)
}

@available(iOS 11.0, *)
func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?){
if error != nil {
didCaptureImageHandler?(nil, .captureFailed)
Expand Down
Loading

0 comments on commit 0045174

Please sign in to comment.