Installation
If you are just starting a new project, you can use our CLI tool to get started quickly.
-
- Add
reown_appkit
as a dependency in yourpubspec.yaml
and runflutter pub get
(check out the latest version) - Or simply run
flutter pub add reown_appkit
- Add
-
- Locate your
/ios/Podfile
file and add the following as the first line:
- Locate your
-
- Run
$ pod install
inside the/ios
folder.
- Run
-
- You should now be able to run your app with
flutter run --dart-define=PROJECT_ID={your_project_id}
- You should now be able to run your app with
Enable Installed Wallet Detection
To enable AppKit to detect installed wallets on the device, you need to make specific changes to the native sides of the project.- 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.
Coinbase Wallet support
Coinbase Wallet does not use the WalletConnect protocol for communication between the dApp and the wallet. This means that pairing topic, session topic, session events and other session-related features are not available when connecting to Coinbase Wallet. However, you can still enable it to seamlessly connect with your dApp with these additional steps. If you still want to support it, on your iOS and Android native side make the following changes:- Open your
Info.plist
file. - Locate the
<key>LSApplicationQueriesSchemes</key>
section. - Include
<string>cbwallet</string>
scheme as mentioned above in previous section
- Make sure pods are installed, otherwise run
pod install
inside your/ios
folder. - Open your
/ios/Runner.xcworkspace
file with Xcode and add the following code inAppDelegate.swift
file:
Disable Coinbase Wallet
Coinbase Wallet is enabled by default even though, in order to function properly, a few steps have to be done as described in the previous section. However, if you don’t want to include/support Coinbase Wallet in your app you just need to pass Coinbase Wallet idfd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa
to excludedWalletIds options Array.
Phantom Wallet support
Phantom Wallet support is available from
reown_appkit: ^1.4.0
.- First, be sure you already have your redirection back property configured in your dApp’s metadata. See Redirect to your dApp
- Then you will have to implement your own Deep Link mechanism on the Flutter (and native) side so that when a link is received through it, you can just call
await _appKitModal.dispatchEnvelope(link);
First, enable Phantom Wallet detection
- Open your
Info.plist
file. - Locate the
<key>LSApplicationQueriesSchemes</key>
section. - Include
<string>phantom</string>
scheme
Then, on Flutter side we create an EventChannel
where links are going to be received and passed to dispatchEnvelope()
.
Then, on both native sides we leverage native APIs to capture the app opening link and send it to Flutter side.
- Android’s platform specific code (only
eventsChannel
is important Phantom wise) - iOS’s platform specific code (only
eventsChannel
is important Phantom wise) - Dart’s specific code (only
eventsChannel
is important Phantom wise)
solana_web3
package.
Disable Phantom Wallet
Phantom Wallet is enabled by default even though, in order to function properly, a few steps have to be done as described in the previous section. However, if you don’t want to include/support Phantom Wallet in your app you just need to pass Phantom Wallet ida797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393
to excludedWalletIds options Array.
Solflare Wallet support
Solflare Wallet support is available from
reown_appkit: ^1.6.0
.- First, be sure you already have your redirection back property configured in your dApp’s metadata. See Redirect to your dApp
- Then you will have to implement your own Deep Link mechanism on the Flutter (and native) side so that when a link is received through it, you can just call
await _appKitModal.dispatchEnvelope(link);
First, enable Solflare Wallet detection
- Open your
Info.plist
file. - Locate the
<key>LSApplicationQueriesSchemes</key>
section. - Include
<string>solflare</string>
scheme
Disable Solflare Wallet
Solflare Wallet is enabled by default even though, in order to function properly, a few steps have to be done as described in the previous section. However, if you don’t want to include/support Solflare Wallet in your app you just need to pass Solflare Wallet id1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79
to excludedWalletIds options Array.
Example
AppKit with Flutter example
Check the Flutter example