Skip to content

Commit

Permalink
Release version 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Team Mobile Schorsch committed Mar 28, 2024
1 parent 52d66a2 commit 7db6855
Show file tree
Hide file tree
Showing 121 changed files with 4,396 additions and 1,269 deletions.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions Documentation/sections/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ The Gini Health API provides an information extraction service for analyzing hea

## Requirements

- iOS 11.0+
- Xcode 12.0+
- iOS 12.0+
- Xcode 15.3+

**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 All @@ -32,4 +32,4 @@ Gini GmbH, hello@gini.net

The Gini Health SDK for iOS is licensed under a Private License. See [the license](https://developer.gini.net/gini-mobile-ios/GiniHealthSDK/license.html) for more info.

**Important:** Always make sure to ship all license notices and permissions with your application.
> ⚠️ **Important:** Always make sure to ship all license notices and permissions with your application.
147 changes: 91 additions & 56 deletions Documentation/source/Customization guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,69 +3,104 @@ Customization guide

The Gini Health SDK components can be customized either through the `GiniHealthConfiguration`, the `Localizable.string` file or through the assets. Here you can find a complete guide with the reference to every customizable item.

- [Generic components](#generic-components)
- [Overview of the UI customization options](#overview-of-the-ui-customization-options)
- [Payment Component](#payment-component)
- [Bank Selection Bottom Sheet](#bank-selection-bottom-sheet)
- [Payment Feature Info Screen](#payment-feature-info-screen)
- [Payment Review screen](#payment-review-screen)


## Supporting dark mode
## Overview of the UI customization options

Some background and text colors use the `GiniColor` type with which you can set colors for dark and light modes. The text colors should also be set in contrast to the background colors.
### Colors

## Generic components
We provide a global color palette `GiniColors.xcassets` which you are free to override.
For example, if you want to override Accent01 color you need to create an Accent01.colorset with your wished value in your main bundle.
The custom colors are then applied to all screens.

##### 1. Gini Capture font
Find the names of the color resources in the color palette (you can also view it in Figma [here](https://www.figma.com/file/rnNBzzwk41f7mB6z58oqV8/iOS-Gini-Health-SDK-4.0.0-UI-Customisation?type=design&node-id=8905%3A975&mode=design&t=o5dQ7ZlNOfbapxmp-1)).

- Font → `GiniHealthConfiguration.customFont`
### Images

Customizing of images is done via overriding of image sets.
If you want to override specific SDK images:
1. Create an asset catalog for images called `GiniImages.xcassets` in your app.
2. Add your own images to `GiniImages.xcassets` using the image names from the SDK's UI customization guide. It is important to name the images you wish to override exactly as shown in the UI customization guide, otherwise overriding won’t work.

### Typography

We provide global typography based on text appearance styles from UIFont.TextStyle.
Preview our typography and find the names of the style resources (you can also view it in Figma [here](https://www.figma.com/file/rnNBzzwk41f7mB6z58oqV8/iOS-Gini-Health-SDK-4.0.0-UI-Customisation?type=design&node-id=2574%3A12863&mode=design&t=o5dQ7ZlNOfbapxmp-1)).

In the example below you can see to override a font for `.body1`

```swift
let configuration = GiniHealthConfiguration()

configuration.updateFont(UIFont(name: "Impact", size: 15)!, for: .body1)
health.setConfiguration(configuration)
```

### Text

Text customization is done via overriding of string resources.
For example you would like to customize pay invoice button label in the Payment Component:

1. Find a string key for a text that you would like to customize.
For the [Pay the invoice button label](https://www.figma.com/file/rnNBzzwk41f7mB6z58oqV8/iOS-Gini-Health-SDK-4.0.0-UI-Customisation?type=design&node-id=8987%3A2854&mode=design&t=o5dQ7ZlNOfbapxmp-1) in the Payment Component we use `ginihealth.paymentcomponent.payInvoice.label`.
2. Add the string key with a desired value to `Localizable.strings` in your app.

### Supporting dark mode

We support dark mode in our SDK. If you decide to customize the color palette, please ensure that the text colors are also set in contrast to the background colors.

## Payment Component

You can also view the UI customisation guide in Figma [here](https://www.figma.com/file/rnNBzzwk41f7mB6z58oqV8/iOS-Gini-Health-SDK-4.0.0-UI-Customisation?type=design&node-id=8987%3A2854&mode=design&t=o5dQ7ZlNOfbapxmp-1).

**Note:**
To copy text from Figma you need to have a Figma account. If you don't have one, you can create one for free.

<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="800" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FrnNBzzwk41f7mB6z58oqV8%2FiOS-Gini-Health-SDK-4.0.0-UI-Customisation%3Ftype%3Ddesign%26node-id%3D8987%253A2854%26mode%3Ddesign%26t%3Do5dQ7ZlNOfbapxmp-1" allowfullscreen></iframe>

## Bank Selection Bottom Sheet

You can also view the UI customisation guide in Figma [here](https://www.figma.com/file/rnNBzzwk41f7mB6z58oqV8/iOS-Gini-Health-SDK-4.0.0-UI-Customisation?type=design&node-id=9008%3A1654&mode=design&t=o5dQ7ZlNOfbapxmp-1).

**Note:**
To copy text from Figma you need to have a Figma account. If you don't have one, you can create one for free.

<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="800" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FrnNBzzwk41f7mB6z58oqV8%2FiOS-Gini-Health-SDK-4.0.0-UI-Customisation%3Ftype%3Ddesign%26node-id%3D9008%253A1654%26mode%3Ddesign%26t%3Do5dQ7ZlNOfbapxmp-1" allowfullscreen></iframe>

## Payment Feature Info Screen

You can also view the UI customisation guide in Figma [here](https://www.figma.com/file/rnNBzzwk41f7mB6z58oqV8/iOS-Gini-Health-SDK-4.0.0-UI-Customisation?type=design&node-id=9044%3A1582&mode=design&t=o5dQ7ZlNOfbapxmp-1).

**Note:**
To copy text from Figma you need to have a Figma account. If you don't have one, you can create one for free.

<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="800" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FrnNBzzwk41f7mB6z58oqV8%2FiOS-Gini-Health-SDK-4.0.0-UI-Customisation%3Ftype%3Ddesign%26node-id%3D9044%253A1582%26mode%3Ddesign%26t%3Do5dQ7ZlNOfbapxmp-1" allowfullscreen></iframe>

## Payment Review screen

You can also view the UI customisation guide in Figma [here](https://www.figma.com/file/rnNBzzwk41f7mB6z58oqV8/iOS-Gini-Health-SDK-4.0.0-UI-Customisation?type=design&node-id=9008%3A1300&mode=design&t=o5dQ7ZlNOfbapxmp-1).

**Note:**
To copy text from Figma you need to have a Figma account. If you don't have one, you can create one for free.

<iframe style="border: 1px solid rgba(0, 0, 0, 0.1);" width="800" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FrnNBzzwk41f7mB6z58oqV8%2FiOS-Gini-Health-SDK-4.0.0-UI-Customisation%3Ftype%3Ddesign%26node-id%3D9008%253A1300%26mode%3Ddesign%26t%3Do5dQ7ZlNOfbapxmp-1" allowfullscreen></iframe>

> **Note:**
> - PaymentReviewViewController contains the following configuration options:
> - paymentReviewStatusBarStyle: Sets the status bar style on the payment review screen. Only if `View controller-based status bar appearance` = `YES` in `Info.plist`.
> - showPaymentReviewCloseButton: If set to true, a floating close button will be shown in the top right corner of the screen.
Default value is false.

For enabling `showPaymentReviewCloseButton`:

```swift
let giniConfiguration = GiniHealthConfiguration()
config.showPaymentReviewCloseButton = true
healthSDK.setConfiguration(config)
```

<br>
<center><img src="img/Customization guide/PaymentReview.PNG" height="500"/></center>
</br>

##### 1. Background color
- Background color &#8594; `GiniHealthConfiguration.paymentScreenBackgroundColor` using `GiniColor` with dark mode and light mode colors

##### 2. Input fields container
- Background color &#8594; `GiniHealthConfiguration.inputFieldsContainerBackgroundColor` using `GiniColor` with dark mode and light mode colors

##### 3. Input field
- Background color &#8594; `GiniHealthConfiguration.paymentInputFieldBackgroundColor` using `GiniColor` with dark mode and light mode colors
- Text color &#8594; `GiniHealthConfiguration.paymentInputFieldTextColor` using `GiniColor` with dark mode and light mode colors
- Font &#8594; `GiniHealthConfiguration.paymentInputFieldFont`
- Corner radius &#8594; `GiniHealthConfiguration.paymentInputFieldCornerRadius`
- Border width &#8594; `GiniHealthConfiguration.paymentInputFieldBorderWidth`

<br>
<center><img src="img/Customization guide/SelectionStyle.jpeg" height="500"/></center>
</br>
- Error selection style border color and error label text color &#8594; `GiniHealthConfiguration.paymentInputFieldErrorStyleColor` using `UIColor`
- Focus selection style border color &#8594; `GiniHealthConfiguration.paymentInputFieldSelectionStyleColor` using `UIColor`
- Focus selection style background color &#8594; `GiniHealthConfiguration.paymentInputFieldSelectionBackgroundColor` using `UIColor`
- Placeholder text color &#8594; `GiniHealthConfiguration.paymentInputFieldPlaceholderTextColor` using `GiniColor` with dark mode and light mode colors
- Placeholder font &#8594; `GiniHealthConfiguration.paymentInputFieldPlaceholderFont`
- Recipient placeholder text &#8594; <span style="color:#009EDF">*ginihealth.reviewscreen.recipient.placeholder*</span> localized string
- IBAN placeholder text &#8594; <span style="color:#009EDF">*ginihealth.reviewscreen.iban.placeholder*</span> localized string
- Amount placeholder text &#8594; <span style="color:#009EDF">*ginihealth.reviewscreen.amount.placeholder*</span> localized string
- Purpose placeholder text &#8594; <span style="color:#009EDF">*ginihealth.reviewscreen.usage.placeholder*</span> localized string

- Recipient error label text &#8594; <span style="color:#009EDF">*ginihealth.errors.failed.recipient.non.empty.check*</span> localized string
- IBAN error label text &#8594; <span style="color:#009EDF">*ginihealth.errors.failed.iban.non.empty.check*</span> localized string
- IBAN validation error label text &#8594; <span style="color:#009EDF">*ginihealth.errors.failed.iban.validation.check*</span> localized string
- Amount error label text &#8594; <span style="color:#009EDF">*ginihealth.errors.failed.amount.non.empty.check*</span> localized string
- Purpose error label text &#8594; <span style="color:#009EDF">*ginihealth.errors.failed.purpose.non.empty.check*</span> localized string
- Default validation error label text &#8594; <span style="color:#009EDF">*ginihealth.errors.failed.default.textfield.validation.check*</span> localized string

- Amount placeholder text &#8594; <span style="color:#009EDF">*ginihealth.reviewscreen.amount.placeholder*</span> localized string
- Purpose placeholder text &#8594; <span style="color:#009EDF">*ginihealth.reviewscreen.usage.placeholder*</span> localized string

##### 4. Pay button
- Text color for disabled state &#8594; `GiniHealthConfiguration.payButtonDisabledTextColor` using `GiniColor` with dark mode and light mode colors
- Background color for disabled state &#8594; `GiniHealthConfiguration.payButtonDisabledTextColor` using `GiniColor` with dark mode and light mode colors
- Font &#8594; `GiniHealthConfiguration.payButtonTextFont`
- Corner radius &#8594; `GiniHealthConfiguration.payButtonCornerRadius`

##### 5. Loading indicator
- Color &#8594; `GiniHealthConfiguration.loadingIndicatorColor` using `GiniColor` with dark mode and light mode colors
- Indicator Style &#8594; `GiniHealthConfiguration.loadingIndicatorStyle` using `UIActivityIndicatorView.Style`
- Scale factor &#8594; `GiniHealthConfiguration.loadingIndicatorScale`
9 changes: 3 additions & 6 deletions Documentation/source/Event tracking guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ Event Tracking
The Gini Health SDK has the ability to track user events. In order to receive the events, implement the `GiniHealthTrackingDelegate` protocol and supply the delegate when initializing `PaymentReviewViewController`. For example:

```swift
let viewController = PaymentReviewViewController.instantiate(with: self.health,
document: document,
extractions: extractions,
trackingDelegate: self)
let viewController = paymentComponentsController.loadPaymentReviewScreenFor(documentID: documentId,
trackingDelegate: self)
```

## Events
Expand All @@ -16,7 +14,6 @@ Event types are partitioned into different domains according to the screens that

| Domain | Event type | Additional info keys | Comment |
| --- | --- | --- | --- |
| Payment Review Screen | `onNextButtonClicked` |`"paymentProvider"`| User tapped "next" button from the payment review screen |
| Payment Review Screen | `onToTheBankButtonClicked` |`"paymentProvider"`| User tapped "To the banking app" button from the payment review screen |
| Payment Review Screen | `onCloseButtonClicked` || User tapped "close" button and closed the payment review screen |
| Payment Review Screen | `onCloseKeyboardButtonClicked` || User tapped "close" button and keyboard will be hidden from the payment review screen |
| Payment Review Screen | `onBankSelectionButtonClicked` |`"paymentProvider"`| User tapped on the bank selection button from the payment review screen |
27 changes: 3 additions & 24 deletions Documentation/source/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,13 @@ Once you have your Swift package set up, adding `GiniHealthSDK` as a dependency

```swift
dependencies: [
.package(url: "https://github.com/gini/health-sdk-ios.git", .exact("3.0.1"))
.package(url: "https://github.com/gini/health-sdk-ios.git", .exact("4.0.0"))
]
```

In case that you want to use the certificate pinning in the library, add `GiniHealthAPILibraryPinning`:
In case that you want to use [the certificate pinning](https://www.ssl.com/blogs/what-is-certificate-pinning/#:~:text=Certificate%20pinning%20is%20a%20security,(Transport%20Layer%20Security)%20protocols.) in the library, add `GiniHealthAPILibraryPinning`:
```swift
dependencies: [
.package(url: "https://github.com/gini/health-sdk-pinning-ios.git", .exact("3.0.1"))
.package(url: "https://github.com/gini/health-sdk-pinning-ios.git", .exact("4.0.0"))
]
```

## Manually

If you prefer not to use a dependency management tool, you can integrate the Gini Health SDK into your project manually.
To do so drop the [GiniHealthSDK](https://github.com/gini/gini-mobile-ios/tree/main/HealthSDK/GiniHealthSDK) (classes and assets) folder into your project as well as its dependant libraries like [GiniHealthAPILibrary](https://github.com/gini/gini-mobile-ios/tree/main/HealthAPILibrary/GiniHealthAPILibrary) and add the files to your target.

For manual installation [GiniHealthSDKPinning](https://github.com/gini/gini-mobile-ios/tree/main/HealthSDK/GiniHealthSDKPinning) you need to copy the sources and assets of its dependencies:
- [GiniHealthAPILibrary](https://github.com/gini/gini-mobile-ios/tree/main/HealthAPILibrary/GiniHealthAPILibrary)
- [GiniHealthAPILibraryPinning](https://github.com/gini/gini-mobile-ios/tree/main/HealthAPILibrary/GiniHealthAPILibraryPinning)
- [GiniHealthSDK](https://github.com/gini/gini-mobile-ios/tree/main/HealthSDK/GiniHealthSDK)

You can find the list of dependencies [here](https://github.com/gini/gini-mobile-ios/blob/main/HealthSDK/GiniHealthSDKPinning/Package.swift).

Xcode will automatically check your project for swift files and will create an autogenerated import header for you.
Use this header in an Objective-C project by adding

```Obj-C
#import "YourProjectName-Swift.h"
```

to your implementation or header files. Note that spaces in your project name result in underscores. So `Your Project` becomes `Your_Project-Swift.h`.
Loading

0 comments on commit 7db6855

Please sign in to comment.