Skip to main content

Link Mode

AppKit Link Mode is a low latency mechanism for transporting One-Click Auth requests and session requests over universal links, reducing the need for a WebSocket connection with the Relay. This significantly enhances the user experience when connecting native dApps to native wallets by reducing the latency associated with networking connections, especially when the user has an unstable internet connection.

How to enable it:

To support link mode add a universal link for your dapp in Cloud project configuration dashboard, configure your Metadata with a valid universal link and set the linkMode property to true:

const metadata = {
name: 'AppKit RN',
description: 'AppKit RN Example',
url: 'https://reown.com',
icons: ['https://avatars.githubusercontent.com/u/179229932'],
redirect: {
native: 'YOUR_APP_SCHEME://',
universal: 'https://example.com/example_dapp',
linkMode: true
}
}

const config = defaultConfig({ metadata })

Platform specifics:

To enable universal links for your app, refer to React Native Documentation.

After following the steps provided in the official guide:

  1. Ensure that you handle incoming Universal Links in the your AppDelegate.mm file.
#import <React/RCTLinkingManager.h>

// Enable deeplinks
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}

// Enable Universal Links
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
return [RCTLinkingManager application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}
  1. Open your project in XCode and go to Settings/Signing & Capabilities/Associated Domains to add the new domain. After this, your_project.entitlement should look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:example.com</string>
</array>
</dict>
</plist>
  1. Update/Create your domain's .well-known/apple-app-site-association file accordingly.

For more information about supporting universal links, visit the Supporting associated domains page

For a debugging guide, visit the Debugging Universal Links page.

Once everything is properly configured, and the user connects with a Link Mode-supporting wallet using One-Click Auth, your dapp will send requests through it.