Options
Explorer recommended wallets
Allows to set default recommended wallets that are fetched from WalletConnect Explorer. You can define a list of wallets ids you'd like to prioritize (order is respected). You can get these ids from the explorer link mentioned before by clicking on a copy icon of your desired wallet card.
Web3Modal.configure(
...
recommendedWalletIds: [String]
...
)
Explorer excluded wallets
Allows to exclude wallets that are fetched from WalletConnect Explorer. You can define an array of wallet ids you'd like to exclude. You can get these ids from the explorer link mentioned before by clicking on a copy icon of your desired wallet card.
Web3Modal.configure(
...
excludedWalletIds: [String]
...
)
Enable Installed Wallet Detection
To enable Web3Modal to detect wallets installed on the device, you need to make specific changes your project Info.plist.
For iOS:
- Open your
Info.plist
file. - Locate the
<key>LSApplicationQueriesSchemes</key>
section. - Add the desired wallet schemes as string entries within the
<array>
. These schemes represent the wallets you want to detect. - Refer to our Info.plist example file for a detailed illustration.
Example:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>metamask</string>
<string>trust</string>
<string>safe</string>
<string>rainbow</string>
<string>uniswap</string>
<!-- Add other wallet schemes names here -->
</array>
Enable Coinbase Wallet
Coinbase Wallet is available from Web3Modal version 1.1.0 and higher
Since Coinbase Wallet uses it own SDK there are a few simply steps to do if you are planning to include and support it
- Open your
Info.plist
file. - Locate the
<key>LSApplicationQueriesSchemes</key>
section. - Include
<string>cbwallet</string>
scheme as mentioned above in previous section
Example:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>cbwallet</string>
<!-- Any other scheme previously added -->
</array>
Then you need to add the following code to your AppDelegate.swift
file
import CoinbaseWalletSDK
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
Web3Modal.instance.handleDeeplink(url)
}
or for SwiftUI attach onOpenURL
modifier somewhere in your view hieararchy like shown below.
WindowGroup {
YourView()
.onOpenURL { url in
Web3Modal.instance.handleDeeplink(url)
}
}
If you don't want to include/support Coinbase Wallet you just need to set coinbaseEnabled
to false
in your Web3Modal configure call.
Was this helpful?