Skip to content

Commit

Permalink
Release version 3.0.0-beta04
Browse files Browse the repository at this point in the history
  • Loading branch information
Team Mobile Schorsch committed Feb 13, 2023
1 parent bff3035 commit cfe43c4
Show file tree
Hide file tree
Showing 50 changed files with 454 additions and 526 deletions.
22 changes: 13 additions & 9 deletions Documentation/source/Customization guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Gini Capture SDK components can be customized either through the `GiniConfig
- [Analysis screen](#analysis-screen)
- [Help screens](#help-screens)
- [No result screen](#no-result-screen)
- [Error screens](#error-screens)
- [Error screens](#error-screen)

## Colors

Expand Down Expand Up @@ -101,7 +101,9 @@ To allow users toggle the camera flash pass `true` to `GiniConfiguration.shared.
- Turn off flash by default:
Flash is on by default, and you can turn it off by passing `false` to `GiniConfiguration.shared.flashOnByDefault`.

### Camera access TODO
### Camera access

<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="600" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F1985HMF83siAXmysSn3dC6%2FiOS-Gini-Capture-SDK-3.0.0-UI-Customisation%3Fnode-id%3D0%253A1%26t%3DtmWKIcsvPJbmqnrS-1" allowfullscreen></iframe>

### QR Code Scanning

Expand Down Expand Up @@ -129,7 +131,9 @@ This feature enables the Gini Capture SDK to import documents from the camera sc

Please find more information in the [Import PDFs and images guide](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/import-pdfs-and-images-guide.html).

### Camera import error handling TODO
### Camera import error handling

<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="600" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F1985HMF83siAXmysSn3dC6%2FiOS-Gini-Capture-SDK-3.0.0-UI-Customisation%3Fnode-id%3D0%253A1%26t%3DtmWKIcsvPJbmqnrS-1" allowfullscreen></iframe>

## Review screen

Expand All @@ -138,7 +142,7 @@ Please find more information in the [Import PDFs and images guide](https://devel
You can show a custom loading indicator with custom animation support on the process button.
Your custom loading indicator should implement `OnButtonLoadingIndicatorAdapter` interface and be passed to `GiniConfiguration.shared.onButtonLoadingIndicator`.

The example implementation is available [here](https://github.com/gini/gini-mobile-ios/blob/GiniCaptureSDK%3B3.0.0-beta03/BankSDK/GiniBankSDKExample/GiniBankSDKExample/CustomLoadingIndicator.swift#L36).
The example implementation is available [here](https://github.com/gini/gini-mobile-ios/blob/GiniCaptureSDK%3B3.0.0-beta04/BankSDK/GiniBankSDKExample/GiniBankSDKExample/CustomLoadingIndicator.swift#L36).

## Analysis screen

Expand All @@ -147,7 +151,7 @@ The example implementation is available [here](https://github.com/gini/gini-mobi
You can show a custom loading indicator with custom animation support.
Your custom loading indicator should implement `CustomLoadingIndicatorAdapter` interface and be passed to `GiniConfiguration.shared.customLoadingIndicator`.

The example implementation is available [here](https://github.com/gini/gini-mobile-ios/blob/GiniCaptureSDK%3B3.0.0-beta03/BankSDK/GiniBankSDKExample/GiniBankSDKExample/CustomLoadingIndicator.swift).
The example implementation is available [here](https://github.com/gini/gini-mobile-ios/blob/GiniCaptureSDK%3B3.0.0-beta04/BankSDK/GiniBankSDKExample/GiniBankSDKExample/CustomLoadingIndicator.swift).

## Help screens

Expand All @@ -169,9 +173,9 @@ The example implementation is availible [here](https://github.com/gini/gini-mobi
You can also disable the supported formats help screen by passing `false` to
`GiniConfiguration.shared.shouldShowSupportedFormatsScreen`.

## Gallery album screen TODO
## Gallery album screen

<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="600" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F1985HMF83siAXmysSn3dC6%2FiOS-Gini-Capture-SDK-3.0.0-UI-Customisation%3Fnode-id%3D279%253A7588%26t%3DcRAvcUKVlwGtGpuh-1" allowfullscreen></iframe>
<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="600" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F1985HMF83siAXmysSn3dC6%2FiOS-Gini-Capture-SDK-3.0.0-UI-Customisation%3Fnode-id%3D279%253A7588%26t%3DtmWKIcsvPJbmqnrS-1" allowfullscreen></iframe>

## No result screen

Expand All @@ -183,10 +187,10 @@ For this you must to implement `GiniCaptureResultsDelegate.giniCaptureDidEnterMa
You can show a bottom navigation bar by passing true to `GiniConfiguration.shared.bottomNavigationBarEnabled`. There is a default implementation, but you can also use
your own by implementing the `NoResultBottomNavigationBarAdapter` interface and passing it to `GiniConfiguration.shared.noResultNavigationBarBottomAdapter`.

You can find more details [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/features.html#no-result-screen-customization).
You can find more details [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/features.html#no-result-screen-customization).

## Error screen

<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="600" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F1985HMF83siAXmysSn3dC6%2FiOS-Gini-Capture-SDK-3.0.0-UI-Customisation%3Fnode-id%3D263%253A6858%26t%3DcRAvcUKVlwGtGpuh-1" allowfullscreen></iframe>

You can find more details [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/features.html#error-screen-customization).
You can find more details [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/features.html#error-screen-customization).
16 changes: 15 additions & 1 deletion Documentation/source/Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ The `Open with` feature allows importing of files from other apps via iOS `share

Please find more information in the [Open with guide](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/open-with-guide.html).

# Help screen Customization
# Help screen customization

You can show your own help screens in the Gini Capture SDK.
You can pass the title and view controller for each screen to the
Expand All @@ -124,6 +124,20 @@ The example implementation is availible [here](https://github.com/gini/gini-mobi
You can also disable the supported formats help screen by passing `false` to
`GiniConfiguration.shared.shouldShowSupportedFormatsScreen`.

# Review screen customization

You can show a custom loading indicator with custom animation support on the process button.
Your custom loading indicator should implement `OnButtonLoadingIndicatorAdapter` interface and be passed to `GiniConfiguration.shared.onButtonLoadingIndicator`.

The example implementation is available [here](https://github.com/gini/gini-mobile-ios/blob/GiniCaptureSDK%3B3.0.0-beta04/BankSDK/GiniBankSDKExample/GiniBankSDKExample/CustomLoadingIndicator.swift#L36).

# Analysis screen customization

You can show a custom loading indicator with custom animation support.
Your custom loading indicator should implement `CustomLoadingIndicatorAdapter` interface and be passed to `GiniConfiguration.shared.customLoadingIndicator`.

The example implementation is available [here](https://github.com/gini/gini-mobile-ios/blob/GiniCaptureSDK%3B3.0.0-beta04/BankSDK/GiniBankSDKExample/GiniBankSDKExample/CustomLoadingIndicator.swift).

# No result screen customization

You can show custom back navigation button on bottom navigation bar. You can pass your custom `NoResultBottomNavigationBarAdapter` implementation to
Expand Down
4 changes: 2 additions & 2 deletions Documentation/source/Getting started.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Once you have your Swift package set up, adding `GiniCaptureSDK` as a dependency

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

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

Expand Down
14 changes: 7 additions & 7 deletions Documentation/source/Migration to version 3.x.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ The following steps will help you migrate to the new public API:
* Handling the analysis results and receiving the extracted information (error or cancellation) can be handled though `GiniCaptureResultsDelegate` protocol implementation.
* You can also provide your own networking by implementing the `GiniCaptureNetworkService` and `GiniCaptureResultsDelegate` protocols. Pass your instances to the `UIViewController` initialiser of GiniCapture as shown below.
* Remove all code related to interacting with the SDK's specific view controllers. From now on the entry point is the `UIViewController` and customization happens through `GiniConfiguration` and via overriding of images and color resources.
* Use the new UI customization options and follow the [Customization guide](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/customization-guide.html) to adapt the look of the new UI.
* Use the new UI customization options and follow the [Customization guide](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/customization-guide.html) to adapt the look of the new UI.

# Migrate from Screen API

The new public API is based on the Screen API, so you only need to use the new UI customization options and follow the [Customization guide](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/customization-guide.html) to adapt the look of the new UI.
The new public API is based on the Screen API, so you only need to use the new UI customization options and follow the [Customization guide](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/customization-guide.html) to adapt the look of the new UI.

# Overview of New UI Customization Options

Expand Down Expand Up @@ -130,7 +130,7 @@ customizations.

Images and text are onboarding page specific and need to be customized for each page.

[here][https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/features.html#onboarding] and [here](https://www.figma.com/file/1985HMF83siAXmysSn3dC6/iOS-Gini-Capture-SDK-3.0.0-UI-Customisation?node-id=243%3A3305&t=6sAk7LGf1mi3zV9L-1).
[here][https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/features.html#onboarding] and [here](https://www.figma.com/file/1985HMF83siAXmysSn3dC6/iOS-Gini-Capture-SDK-3.0.0-UI-Customisation?node-id=243%3A3305&t=6sAk7LGf1mi3zV9L-1).

### Breaking Changes

Expand Down Expand Up @@ -191,7 +191,7 @@ String keys changed:
You can show a bottom navigation bar by passing true to `GiniConfiguration.shared.bottomNavigationBarEnabled`. There is a default implementation, but you can also use
your own by implementing the `HelpBottomNavigationBarAdapter` interface and passing it to `GiniConfiguration.shared.helpNavigationBarBottomAdapter`.

You can find more details [here][https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/features.html#help-screen-customization] and [here](https://www.figma.com/file/1985HMF83siAXmysSn3dC6/iOS-Gini-Capture-SDK-3.0.0-UI-Customisation?node-id=141%3A2328&t=6sAk7LGf1mi3zV9L-1).
You can find more details [here][https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/features.html#help-screen-customization] and [here](https://www.figma.com/file/1985HMF83siAXmysSn3dC6/iOS-Gini-Capture-SDK-3.0.0-UI-Customisation?node-id=141%3A2328&t=6sAk7LGf1mi3zV9L-1).

## Analysis screen

Expand Down Expand Up @@ -274,7 +274,7 @@ For this you must to implement `GiniCaptureResultsDelegate.giniCaptureDidEnterMa
You can show a bottom navigation bar by passing true to `GiniConfiguration.shared.bottomNavigationBarEnabled`. There is a default implementation, but you can also use
your own by implementing the `NoResultBottomNavigationBarAdapter` interface and passing it to `GiniConfiguration.shared.noResultNavigationBarBottomAdapter`.

You can find more details [here](https://www.figma.com/file/1985HMF83siAXmysSn3dC6/iOS-Gini-Capture-SDK-3.0.0-UI-Customisation?node-id=263%3A6989&t=7wXW9XyhTUcmp5sk-1) and [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/customization-guide.html#no-result-screen).
You can find more details [here](https://www.figma.com/file/1985HMF83siAXmysSn3dC6/iOS-Gini-Capture-SDK-3.0.0-UI-Customisation?node-id=263%3A6989&t=7wXW9XyhTUcmp5sk-1) and [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/customization-guide.html#no-result-screen).

## Error screen

Expand All @@ -295,11 +295,11 @@ The new error screen gives options to retake photos or enter details manually an
You can show a bottom navigation bar by passing true to `GiniConfiguration.shared.bottomNavigationBarEnabled`. There is a default implementation, but you can also use
your own by implementing the `ErrorBottomNavigationBarAdapter` interface and passing it to `GiniConfiguration.shared.errorNavigationBarBottomAdapter`.

You can find more details [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/customization-guide.html#error-screen).
You can find more details [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/customization-guide.html#error-screen).

#### Option to enter details manually

You can show your own UI for data input if an error occured and the user clicks the "Enter manually" button on the error screen.
For this you must to implement `GiniCaptureResultsDelegate.giniCaptureDidEnterManually() `.

You can find more details [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/features.html#error-screen-customization) and [here]((https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta03/customization-guide.html#error-screen).
You can find more details [here](https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/features.html#error-screen-customization) and [here]((https://developer.gini.net/gini-mobile-ios/GiniCaptureSDK/3.0.0-beta04/customization-guide.html#error-screen).
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ To inject your API credentials into the Example app, just add to the Example dir

## Requirements

- iOS 11+
- iOS 12+
- Xcode 12+

**Note:**
In order to have better analysis results it is highly recommended to enable only devices with 8MP camera and flash. These devices would be:

* iPhones with iOS 11 or higher.
* iPhones with iOS 12 or higher.
* iPad Pro devices (iPad Air 2 and iPad Mini 4 have 8MP camera but no flash).

## Author
Expand Down
35 changes: 25 additions & 10 deletions Sources/GiniCaptureSDK/Core/Custom views/BottomLabelButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,27 @@ final class BottomLabelButton: UIView {
return image
}()

private lazy var contentView: UIView = {
let contentView = UIView()
contentView.translatesAutoresizingMaskIntoConstraints = false

return contentView
}()

init() {
super.init(frame: .zero)
addSubview(actionLabel)
addSubview(iconView)
addSubview(contentView)
contentView.addSubview(actionLabel)
contentView.addSubview(iconView)
addSubview(actionButton)
setupConstraints()
}

required init?(coder aDecoder: NSCoder) {
super.init(frame: .zero)
addSubview(actionLabel)
addSubview(iconView)
addSubview(contentView)
contentView.addSubview(actionLabel)
contentView.addSubview(iconView)
addSubview(actionButton)
}

Expand All @@ -69,15 +78,21 @@ final class BottomLabelButton: UIView {
actionButton.trailingAnchor.constraint(equalTo: trailingAnchor),
actionButton.leadingAnchor.constraint(equalTo: leadingAnchor),

iconView.centerYAnchor.constraint(equalTo: centerYAnchor, constant: -10),
iconView.leadingAnchor.constraint(equalTo: leadingAnchor),
iconView.trailingAnchor.constraint(equalTo: trailingAnchor),
contentView.topAnchor.constraint(greaterThanOrEqualTo: topAnchor, constant: 5),
contentView.bottomAnchor.constraint(lessThanOrEqualTo: bottomAnchor, constant: -5),
contentView.centerYAnchor.constraint(equalTo: centerYAnchor),
contentView.trailingAnchor.constraint(equalTo: trailingAnchor),
contentView.leadingAnchor.constraint(equalTo: leadingAnchor),

iconView.topAnchor.constraint(equalTo: contentView.topAnchor),
iconView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
iconView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
iconView.heightAnchor.constraint(equalToConstant: 20),

actionLabel.topAnchor.constraint(equalTo: iconView.bottomAnchor, constant: 5),
actionLabel.leadingAnchor.constraint(equalTo: leadingAnchor),
actionLabel.trailingAnchor.constraint(equalTo: trailingAnchor),
actionLabel.bottomAnchor.constraint(lessThanOrEqualTo: bottomAnchor, constant: 0)
actionLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
actionLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
actionLabel.bottomAnchor.constraint(equalTo: contentView.bottomAnchor)
])
}

Expand Down
2 changes: 2 additions & 0 deletions Sources/GiniCaptureSDK/Core/Custom views/ButtonsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ class ButtonsView: UIView {
let button = MultilineTitleButton()
button.translatesAutoresizingMaskIntoConstraints = false
button.setTitle(firstButtonTitle, for: .normal)
button.accessibilityLabel = firstButtonTitle
return button
}()

lazy var retakeButton: MultilineTitleButton = {
let button = MultilineTitleButton()
button.translatesAutoresizingMaskIntoConstraints = false
button.setTitle(secondButtonTitle, for: .normal)
button.accessibilityLabel = secondButtonTitle
return button
}()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ final class ContainerNavigationController: UIViewController {
self.rootViewController = rootViewController
self.coordinator = parent
self.giniConfiguration = giniConfiguration
setStatusBarStyle(to: giniConfiguration.statusBarStyle)
super.init(nibName: nil, bundle: nil)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extension UINavigationController {
public func applyStyle(withConfiguration configuration: GiniConfiguration) {
let titleTextAttrubutes = [NSAttributedString.Key.font:
configuration.textStyleFonts[.bodyBold] as Any, NSAttributedString.Key.foregroundColor: GiniColor(light: UIColor.GiniCapture.dark1, dark: UIColor.GiniCapture.light1).uiColor()]
let navigationBackgroundColor = GiniColor(light: UIColor.GiniCapture.light1, dark: UIColor.GiniCapture.dark2).uiColor()
let navigationBackgroundColor = GiniColor(light: UIColor.GiniCapture.light2, dark: UIColor.GiniCapture.dark2).uiColor()
if #available(iOS 13.0, *) {
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
Expand Down
7 changes: 0 additions & 7 deletions Sources/GiniCaptureSDK/Core/GiniConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,6 @@ import GiniBankAPILibrary
*/
@objc public var shouldShowDragAndDropTutorial = true

// MARK: Albums screen

/**
Sets the text color for the select more photos button on the albums screen.
*/
@objc public var albumsScreenSelectMorePhotosTextColor = GiniColor(light: Colors.Gini.blue, dark: Colors.Gini.blue)

/**
Set an array of additional custom help menu items . Those items will be presented as table view cells on the help menu screen. By selecting the cell the user will be redirected to the page, which represented by viewController provided by customer during the `HelpMenuViewController.Item` initialization.
*/
Expand Down
6 changes: 3 additions & 3 deletions Sources/GiniCaptureSDK/Core/Models/GiniCaptureDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ public class GiniCaptureDocumentBuilder: NSObject {
- Returns: A `GiniCaptureDocument` if `data` has a valid type or `nil` if it hasn't.

*/
public func build(with data: Data) -> GiniCaptureDocument? {
public func build(with data: Data, fileName: String?) -> GiniCaptureDocument? {
if data.isPDF {
return GiniPDFDocument(data: data)
return GiniPDFDocument(data: data, fileName: fileName)
} else if data.isImage {
return GiniImageDocument(data: data,
imageSource: documentSource,
Expand All @@ -100,7 +100,7 @@ public class GiniCaptureDocumentBuilder: NSObject {
return
}

completion(self.build(with: data))
completion(self.build(with: data, fileName: openURL.lastPathComponent))
}
}
}
Expand Down
Loading

0 comments on commit cfe43c4

Please sign in to comment.