- Set up your Tink Console account and retrieve the
client IDfor your app. - Add a universal link (or deep link) to your app in the list of redirect URIs under App settings > API client (eg.
myapp://callback). - Add a universal link (or deep link) scheme into supported URL Types of your app:
- Open your iOS project (xcodeproj file).
- Select your app in the list
Targets. - Open
Infosection. - Navigate down and expand
URL Typessection. - Press plus (
+) button. - Add your universal link (or deep link) scheme into
URL Schemesfield (eg.myapp).
- Add url handling in your app
SceneDelegate:
import UIKit
import TinkLink
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
guard let url = URLContexts.first?.url else { return }
Tink.openUrl(url)
}
}
- iOS 14.0
- Xcode 15.0
- Swift 5.10
Add a package dependency in Xcode to your app target.
- In Xcode, select File > Add Packages...
- Enter
https://github.com/tink-ab/tink-link-iosas the repository URL. - Add the
TinkLinkproduct to the target of your app.
Add TinkLink to your Podfile:
pod "TinkLink"- Download and extract the
TinkLink.xcframeworkfrom the releases page on GitHub. - Drag
TinkLink.xcframeworkto the Frameworks, Libraries, and Embedded Content section of the General settings tab for your application target in your Xcode project. Make sure to select Copy items if needed.
- Define
clientID:
let clientID: String = YOUR_CLIENT_ID
Your client ID (retrieved from Console).
- Define
redirectURI:
let redirectURI: String = YOUR_REDIRECT_URI
The app uri the end-user is redirected to after completing the flow together with the response parameters (configured in Console).
- Define
baseDomain:
let baseDomain: BaseDomain = .eu
It determines the API base domain for Tink Link. EU, US or custom.
- Define
enableSafariViewController:
let enableSafariViewController: Bool = false/true
enableSafariViewController parameter defines SDK behaviour in case of 3rd party authentiation redirect.
- Set
falseif it is preferred to redicrect to default iOS browser. In such case user being redirected into browser for authentication and back into clients app. - Set
trueif it is preferred to present 3rd party authentiation resource within clients app via SFSafariViewController.
- Initialize
configuration:
let configuration = Configuration(clientID: clientID, redirectURI: redirectURI, baseDomain: baseDomain, enableSafariViewController: enableSafariViewController)
To launch the SDK in your iOS app, please see the product specific documentation.
| Account Check | Getting started | Setup and integrate | SDK reference |
| Expense Check | Getting started | Setup and integrate | SDK reference |
| Income Check | Getting started | Setup and integrate | SDK reference |
| One-time payments | Getting started | Setup and integrate | SDK reference |
| Risk Insights | Getting started | Setup and integrate | SDK reference |
| Transactions | Getting started | Setup and integrate | SDK reference |
| Report bundling | - | - | SDK reference |
| Account Aggregation | Getting started | - | SDK reference |
You can also optimize your integration in different ways, such as preselecting a provider. To preselect a provider, simply specify your provider name as a value to the inputProvider argument for the API calls where it's available, like in this example:
let viewController = Tink.Transactions.connectAccountsForOneTimeAccess(
configuration: config,
market: market,
inputProvider: "sbab-bankid",
completion: handler
)Parameter inputProvider gives the option to use the data to skip the provider-selection screen and preselect the user's provider (in this example, SBAB is preselected).
To get the list of all providers available for an authenticated user, please refer to list-providers. To get the list of all providers on a specified market, please refer to list-providers-for-a-market.
- TinkLinkSimpleSample shows how to build a complete flow for the Transaction product by using Tink Link in the easiest and fastest manner.
For the full API reference, please see the Tink Link iOS SDK Reference.
For any questions and/or support, please contact us directly here: https://docs.tink.com/resources/support.
