Skip to main content

Configuration and Customization

The MetricSDKConfiguration class is used to customise the look of the SDK such as colors and brand image. By default, your SDK environment is set to Environment.sanbox. Set to Environment.production when ready for release. Call MetricService.configure() and pass in your configuration [Preferably in the viewDidLoad() of the View Controller that will launch the SDK].

...
import MetricSDK
...
class ViewController: UIViewController {
...
let config = MetricSDKConfiguration()

override func viewDidLoad() {
super.viewDidLoad()
...
config.environment = Environment.sandbox
config.brandLogoImageUrl = "htttps://example/image.png"
config.brandPrimaryColor = "" //eg. #BBBBBB
MetricService.configure(config)
...
}
...
}