Getting started
Before diving further into this guide, you should be familiar with these two procedures:
Preparing the theme
Extract the theme variant from Figma and place the themes' JSON file in your Xcode project. Make sure that the JSON file is included in your Copy Bundle Resources build phase.
Switching themes
Install latest version of the Design System
First, you will need to have your BackbaseDesignSystem CocoaPod at minimum version 5.3.0.
Using the theme switch functionality
In your code where appropriate you can import BackbaseDesignSystem and use the static function Theme.switchTo("<FILENAME>") where the filename is the exported JSON filename.
Reapplying themes in UIKit
You will need your view controller stack to be recreated for the theme to take effect as colors in UIKit do not update automatically. The easiest way is by recreating the view controller that is assigned to your app delegates window.rootViewController. A simple approach to doing this within a Backbase context would be to logout the user and log back in, or apply the theme when the root view controller is about to change.
You can refer to our golden sample app for an example of how this can be done.