Whitelabel PnP iOS SDK
For defining custom UI, branding, and translations for your brand app, you just need to define an optional object called W3AWhiteLabelData
.
W3AWhiteLabelData
can be definied during initialization of the SDK in W3AInitParams
object.
This is a paid feature and the minimum pricing plan to use this SDK in a production environment is the Growth Plan. You can use this feature in the development environment for free.
Arguments
The parameters which can be used to customize the User Flow Screens are given below:
- Table
- Interface
Parameter | Description |
---|---|
appName? | Display name for the app in the UI. |
logoLight? | App logo to be used in dark mode. It accepts url in String as a value. |
logoDark? | App logo to be used in light mode. It accepts url in String as a value. |
defaultLanguage? | Language which will be used by Web3Auth, app will use browser language if not specified. Default language is Language.en . Checkout Language for supported languages. |
mode? | Theme mode for the login modal. Choose between ThemeModes.auto , ThemeModes.light or ThemeModes.dark background modes. Default value is ThemeModes.AUTO . |
theme? | Used to customize the theme of the login modal. It accepts Dictonary of [String:String] as a value. |
appUrl? | Url to be used in the Modal. It accepts url in String as a value. |
useLogoLoader? | Use logo loader. If logoDark and logoLight are nil, the default Web3Auth logo will be used for the loader. Default value is false. |
public struct W3AWhiteLabelData: Codable {
let appName: String?
let logoLight: String?
let logoDark: String?
let defaultLanguage: Language?
let mode: ThemeModes?
let theme: [String: String]?
let appUrl: String?
let useLogoLoader: Bool?
}
name
The name of the application. This will be displayed in the key reconstruction page.
Standard screen without any change
Name changed to Formidable Duo
logoLight
& logoDark
The logo of the application. Displayed in dark and light mode respectively. This will be displayed in the key reconstruction page.
logoLight
on dark mode
logoDark
on light mode
defaultLanguage
Default language will set the language used on all OpenLogin screens. The supported languages are:
en
- English (default)de
- Germanja
- Japaneseko
- Koreanzh
- Mandarines
- Spanishfr
- Frenchpt
- Portuguesenl
- Dutch
dark
Can be set to true
or false
with default set to false
.
For Light: dark: false
For Dark: dark: true
theme
Theme is a record of colors that can be configured. As of, now only primary
color can be set and has effect on OpenLogin screens (default primary
color is #0364FF
). Theme affects icons and links. Examples below.
Standard color #0364FF
Color changed to #D72F7A
Example
web3Auth = await Web3Auth(
W3AInitParams(
clientId: "YOUR_CLIENT_ID",
network: .testnet,
whiteLabel: W3AWhiteLabelData(
appName: "Web3Auth Stub",
logoLight: "https://images.web3auth.io/web3auth-logo-w.svg",
logoDark: "https://images.web3auth.io/web3auth-logo-w.svg",
defaultLanguage: .en, // en, de, ja, ko, zh, es, fr, pt, nl
mode: .dark
theme: ["primary": "#d53f8c"]
)
))