> For the complete documentation index, see [llms.txt](/llms.txt).

# Migration guide from v7 to v8 for Web3Auth PnP iOS SDK

## Overview[​](#overview "Direct link to Overview")

This migration guide provides steps for upgrading from version 7(v7) to version 8(v8) of the Web3Auth PnP iOS SDK. The guide outlines significant changes and enhancements, including the introduction of `enableMFA` method to initiate Multi-Factor Authentication (MFA) setup flow, `request` method for transaction confirmation screens, and `launchWalletServices` method for template wallet interface.

## Changes in detail[​](#changes-in-detail "Direct link to Changes in detail")

### `enableMFA` method[​](#enablemfa-method "Direct link to enablemfa-method")

From v8, developers can now use the `enableMFA` method to initiate MFA setup flow for already logged in users.

- Default Verifier
- Custom JWT Verifier

Usage

```
do {
	let isMFAEnabled = try await self.web3Auth.enableMFA()
} catch {
	print(error.localizedDescription)
	// Handle Error
}

```

Usage

```
do {
	let loginParams = W3ALoginParams(
		.JWT,
		extraLoginOptions: .init(id_token: "your_jwt_token")
  	)

    let isMFAEnabled = try await self.web3Auth.enableMFA(loginParams)

} catch {
  print(error.localizedDescription)
  // Handle Error
}


```

### `launchWalletServices` method[​](#launchwalletservices-method "Direct link to launchwalletservices-method")

From v8, developers can use the `launchWalletServices` to launches a WebView which allows them to use the templated wallet UI services. Developers can pass the `ChainConfig` in `W3AInitParams` to open Wallet Services with a specific chain selected.

note

Access to Wallet Services is gated. You can use this feature in `sapphire_devnet` for free. The minimum [pricing plan](https://web3auth.io/pricing.html) to use this feature in a production environment is the **Scale Plan**.

#### ChainConfig arguments[​](#chainconfig-arguments "Direct link to ChainConfig arguments")

| Parameter         | Description                                                                                                               |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------- |
| chainNamespace    | Custom configuration for your preferred blockchain. As of now only EVM supported. Default value is ChainNamespace.eip155. |
| decimals?         | Number of decimals for the currency ticker. Default value is 18, and accepts int as value.                                |
| blockExplorerUrl? | Blockchain's explorer URL. (for example, https://etherscan.io)                                                            |
| chainId           | The chain ID of the selected blockchain in hex String.                                                                    |
| displayName?      | Display Name for the chain.                                                                                               |
| logo?             | Logo for the selected chainNamespace & chainId.                                                                           |
| rpcTarget         | RPC Target URL for the selected chainNamespace & chainId.                                                                 |
| ticker?           | Default currency ticker of the network (for example, ETH)                                                                 |
| tickerName?       | Name for currency ticker (for example, Ethereum)                                                                          |

#### Usage[​](#usage "Direct link to Usage")

Usage

```
do {
  var chainConfig = ChainConfig(
    chainNamespace: ChainNamespace.eip155,
    chainId: "0x1",
    rpcTarget: "https://mainnet.infura.io/v3/${key}",
    ticker: "ETH"
  )

  val web3Auth = await Web3Auth(.init(
    clientId: clientID,
    network: network,
    buildEnv: buildEnv,
    chainConfig: chainConfig
  ))

  try await web3Auth?.launchWalletServices(
    W3ALoginParams(loginProvider: .GOOGLE),
  )
} catch {
  // Handle error
}

```

### `request` method[​](#request-method "Direct link to request-method")

Now, developers can use the `request` method to use the templated transaction confirmation screens for signing transactions. To retrive the signature for the request, developers can use the `getSignResponse` static method.

Usage

```
var params = [Any]()
params.append("Hello, Web3Auth from Android!")
params.append("0x764dd67c0420b43a39ab337463d8995622f226a2")
params.append("Web3Auth")

do {
  try await self.web3Auth?.request(
    W3ALoginParams(loginProvider: .GOOGLE, mfaLevel: .NONE),
    method: "personal_sign",
    requestParams: params
  )
} catch {
  // Handle error
}

```
