- Follow the getting started guide to set up your Tink account.
- Get an access token with the scopes required for the features you intend to use.
- iOS 13.0
- Xcode 14.1
-
Follow these instructions to link a target to a package product.
-
Enter this URL
https://github.com/tink-ab/tink-money-manager-ios
when asked for a package repository. -
When Xcode is done resolving
tink-money-manager-ios
and asks you to choose package products, selectTinkMoneyManagerUI
.
Refer to their guide for usage and installation instructions.
-
Add
TinkMoneyManagerUI
to your Podfile.pod "TinkMoneyManagerUI"
-
Run
pod install
in your project directory. -
Open your
.xcworkspace
file to see the project in Xcode.
Drag the TinkMoneyManagerUI.xcframework
and TinkCore.xcframework
into the Frameworks, Libraries, and Embedded Content section on your application targets’ General tab.
You should now be able to import TinkMoneyManagerUI
within your project.
The SDK needs a valid access token for a specific user to function correctly. Since the SDK does not handle any type of authentication, this needs to be done by your backend.
See this link for more info on how this is done. Once you have an access token you pass it on to your Tink
instance.
Tink.shared.userSession = .accessToken(<#T##String#>)
Create a FinanceOverviewViewController
and provide which features should be displayed. The FinanceOverviewViewController
is designed to be used in a navigation controller so you need to embed it in one.
let financeOverviewViewController = FinanceOverviewViewController(features: [.statistics([.expenses, .income]), .accounts, .latestTransactions])
let navigationController = UINavigationController(rootViewController: financeOverviewViewController)
// Present or add to a UITabBarController for instance.
User access tokens expire after a set amount of time. You can keep your user logged in by exchanging your refresh token for a new access token (see Tink docs) and updating the Tink
instance you use. If needed you can also refresh the statistics, accounts, and latest transactions:
Tink.shared.userSession = .accessToken(<#String#>)
Tink.shared.refresh()
To configure colors, font or icons you update the Appearance.provider
.
This needs to be done before initializing the FinanceOverviewViewController
or any of the other view controllers provided by this SDK.
Color |
Description |
---|---|
background |
Color for the main background of the interface. |
secondaryBackground |
Color for content layered on top of the main background. |
groupedBackground |
Color for the main background of grouped interface components. |
secondaryGroupedBackground |
Color for content layered on top of the main background of grouped interface components. |
label |
Primary text color. |
secondaryLabel |
Secondary text color. |
separator |
Color for separators. |
accent |
Colors for buttons, indicators and other similar elements. |
expenses |
Color to represent expenses. |
income |
Color to represent income. |
transfers |
Color to represent transfers. |
uncategorized |
Color representing uncategorized transactions. |
warning |
Color representing a warning. |
let colorProvider = ColorProvider()
colorProvider.accent = <#UIColor#>
colorProvider.expenses = <#UIColor#>
colorProvider.income = <#UIColor#>
colorProvider.transfers = <#UIColor#>
colorProvider.uncategorized = <#UIColor#>
Appearance.provider.colors = colorProvider
You can decide if you want to change all icons or just some icons. It is also possible to customize the icons background corner radiuses with categoryIconBackgroundCornerRadiusFactor
. This can be set with a factor from 0.0
to 1.0
where 0.0
results in a square shape and 1.0
, which is the default value, makes a circle.
You can configure colors, font and icons by providing the SDK with a ColorProviding
, IconProviding
and FontProviding
type respectively. The SDK also provides a AppearanceProvider
type that can be used to easily customize the views.
let colorProvider = ColorProvider()
let fontProvider = FontProvider()
let iconProvider = IconProvider()
colorProvider.accent = <#UIColor#>
colorProvider.expenses = <#UIColor#>
colorProvider.income = <#UIColor#>
colorProvider.transfers = <#UIColor#>
colorProvider.uncategorized = <#UIColor#>
fontProvider.lightFont = <#UIFont#>
fontProvider.regularFont = <#UIFont#>
fontProvider.semiBoldFont = <#UIFont#>
fontProvider.boldFont = <#UIFont#>
iconProvider.wellness = <#UIImage#>
iconProvider.house = <#UIImage#>
iconProvider.entertainment = <#UIImage#>
iconProvider.shopping = <#UIImage#>
iconProvider.categoryIconBackgroundCornerRadiusFactor = <#CGFloat#>
Appearance.provider = AppearanceProvider(colors: colorProvider, fonts: fontProvder, icons: iconProvider)
The SDK will cache fetched data in memory. If the user logs out, you need to reset the cache to make sure there won't be any cached data presented to the wrong user.
Tink.shared.resetCache()
Numerical and time-based information such as transaction amounts and dates are formatted with the locale settings set by the current user in the system Settings app.
Since some user-facing text is sent from the Tink API we recommend you to set the locale
of the Tink user model to match the user's preference for a consistent user experience.
User-facing text in the SDK are in English by default. To add translations for other locales, refer to the Localizable Strings guide.
View controllers from the SDK should always be displayed in a portrait orientation since they currently do not support landscape orientations.
If presented in a landscape orientation, it will cause unexpected results and a suboptimal user experience.
Disable other orientations than portrait by either overriding supportedInterfaceOrientations
in the view controller that presents the view controller you're using from the SDK.
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return .portrait
}
Or by disabling all Device Orientations except Portrait
in the Deployment Info section on your application targets’ General tab.
This example project shows how to setup and use the FinanceOverviewViewController
in your app.
For more detailed usage and full documentation, please refer to our guide.
Tink was founded in 2012 with the aim of changing the banking industry for the better. We have built Europe’s most robust open banking platform – with the broadest, deepest connectivity and powerful services that create value out of the financial data.
👋 We are continuously working on improving the developer experience of our API offering. Contact us for support, questions or suggestions.