diff --git a/docs/pnp/migration-guides/ios-v6-to-v7.mdx b/docs/pnp/migration-guides/ios-v6-to-v7.mdx index 80a6e9904..5ea4ef470 100644 --- a/docs/pnp/migration-guides/ios-v6-to-v7.mdx +++ b/docs/pnp/migration-guides/ios-v6-to-v7.mdx @@ -27,19 +27,20 @@ let web3auth = Web3Auth(W3AInitParams( ### `Web3AuthState` now has more parameters -In v7, you should add `coreKitKey` and `coreKitEd25519PrivKey` field when you initialize `Web3authState`. +In v7, you can configure additional `coreKitKey` and `coreKitEd25519PrivKey` fields when you initialize `Web3authState`. ```swift -let user: Web3AuthState = .init(privKey: "12345", - ed25519PrivKey: "32334", - sessionId: "23234384y7735y47shdj", - userInfo: nil, - error: nil, +public struct Web3AuthState: Codable { + public let privKey: String? + public let ed25519PrivKey: String? + public let sessionId: String? + public let userInfo: Web3AuthUserInfo? + public let error: String? // highlight-start - coreKitKey: "45676", - coreKitEd25519PrivKey: "84567" + public let coreKitKey: String? + public let coreKitEd25519PrivKey: String? // highlight-end -) +} ``` ### `W3AInitParams` param configuration changed @@ -72,20 +73,38 @@ parameters have been added to `W3AInitParams`. -| Parameter | Type | Mandatory | Description | -| ----------------- | ------------------ | --------- | --------------------------------------- | -| `appName` | `String` | No | Name of your application | -| `logoLight` | `String` | No | Light logo for dark background | -| `logoDark` | `String` | No | Dark logo for light background | -| `defaultLanguage` | `String` | No | Default translation language to be used | -| `mode` | `Bool` | No | 3 Theme modes of the application | -| `theme` | `[String, String]` | No | Whitelabel theme | -| `appUrl` | `String` | No | Url of your application | -| `useLogoLoader` | `Bool` | No | Loads the logo when loading | +| Parameter | Type | Description | Default | Mandatory | +| ----------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------- | +| `appName` | `String` | App name to be displayed in the User Flow Screens. | dApp's Website URL | No | +| `logoLight` | `String` | App logo to be shown on the dark background (dark theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `logoDark` | `String` | App logo to be shown on the light background (light theme) | [web3auth-logo.svg](https://images.web3auth.io/web3auth-logo.svg) | No | +| `defaultLanguage` | `Language` | Default Language to use.
Choose from: | en - English | No | +| `mode` | `ThemeModes` | Choose between `auto`, `light` or `dark` modes. | `auto` | No | +| `theme` | `[String: String]` | Used to customize the theme of the login modal with the following options
`'primary'` - To customize the primary color of the modal's content | `#0364FF` | No | +| `appUrl` | `String` | App URL to be displayed in the User Flow Screens. | dApp's Website URL | No | +| `useLogoLoader` | `Bool` | Loads the logo when loading | false | No |
+ +```swift title="Usage" +web3Auth = await Web3Auth( + W3AInitParams( + clientId:"YOUR_CLIENT_ID", + network: .testnet, + // highlight-start + 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"]) + )) + // highlight-end +``` + #### change of `W3AInitParams` object The `Web3Auth` constructor takes an object called `W3AInitParams` as input. The below are the aviliable fields of the `W3AInitParams` object. With v7, diff --git a/docs/sdk/pnp/ios/install.mdx b/docs/sdk/pnp/ios/install.mdx index 3d375b97b..1481a8670 100644 --- a/docs/sdk/pnp/ios/install.mdx +++ b/docs/sdk/pnp/ios/install.mdx @@ -24,7 +24,7 @@ description: "Installing Web3Auth PnP iOS SDK | Documentation - Web3Auth" ## Cocoapods ```sh -pod 'Web3Auth', '~> 7.4.0' +pod 'Web3Auth', '~> 7.4.1' ``` ## Configuration diff --git a/docs/sdk/pnp/ios/ios.mdx b/docs/sdk/pnp/ios/ios.mdx index ab78367ba..6d85e2eda 100644 --- a/docs/sdk/pnp/ios/ios.mdx +++ b/docs/sdk/pnp/ios/ios.mdx @@ -10,7 +10,7 @@ iOS SDK is a client-side library you can use with your iOS app to authenticate u custodial way on successful authentication of the user. This authentication can be achieved by using any of the social logins Web3Auth provides or using a custom authentication flow of your choice. -#### This Documentation is based on the `7.4.0` SDK Version. +#### This Documentation is based on the `7.4.1` SDK Version. ### Requirements