Skip to content

TryYourSize(publishableKey:configuration:)

ConstructorTryYourSize (Swift)

Creates the client for your publishable key. Keep one per app.

public init(publishableKey: String, configuration: Configuration = Configuration()) throws
publishableKeyStringRequired

Your publishable key (pk_test_… / pk_live_…).

configurationConfigurationOptional= Configuration()

Appearance, language and the app identity. See Configuration(/reference/ios/configuration/).

TryYourSizeError with code secret_key_in_app, invalid_key, invalid_app_identifier or invalid_option.

let tys = try TryYourSize(publishableKey: "pk_test_…", configuration: .init(
appearance: Appearance(borderRadius: 10),
locale: "es"))

Was this page helpful?