SDK / REACT NATIVE
Deep linking for React Native apps.
Resolve URLs delivered to React Native Linking and use the SDK hook to handle cold-start and in-session links above your navigator.
01 / Install
Add the SDK
npm install @wilderlinks/wilderlinks-react-native@1.0.502 / Configure
Initialize once
Use the WilderLinks API base URL and add the exact link host configured for your app. Replace links.example.com with that host.
import { init } from '@wilderlinks/wilderlinks-react-native';
init({
baseUrl: 'https://api.wilderlinks.space',
domains: ['links.example.com'],
});03 / Resolve
Handle an incoming link
The SDK returns a match result; your application remains responsible for navigating to the right screen.
import { Text } from 'react-native';
import { useWilderlinks } from '@wilderlinks/wilderlinks-react-native';
export function DeepLinkStatus() {
const { resolved, loading } = useWilderlinks();
if (loading) return null;
if (!resolved?.matched) return <Text>No matching WilderLinks URL</Text>;
return <Text>{JSON.stringify(resolved.deepLinkPayload ?? {})}</Text>;
}Fields returned by the primary link handler
matchedinstallIdopenIdtitledestinationUrldeepLinkPayloadinstallAttributionProvidererror04 / Deferred matching
Match only tokens your app can access
import { matchDeferredToken } from '@wilderlinks/wilderlinks-react-native';
async function matchToken(tokenReceivedByYourApp: string) {
return matchDeferredToken('https://api.wilderlinks.space', tokenReceivedByYourApp);
}- checkDeferredInstall() reads the clipboard and requires the optional @react-native-clipboard/clipboard peer package to be installed in the app.
- matchDeferredToken(baseUrl, token) accepts a token obtained by your app. Android Play Install Referrer integration must be supplied by native app code.
- The SDK does not automatically recover an iOS App Store token.
05 / Platform setup
Before testing on a device
- Peer requirements in package.json are React >=17 and React Native >=0.70.
- Run init(...) once before rendering a component that uses useWilderlinks().
- Mount useWilderlinks() near the root, above your navigator. It reads Linking.getInitialURL(), subscribes to Linking URL events, and returns { resolved, loading }.
- Configure iOS Universal Links and Android App Links in the native app. This SDK handles URLs delivered by React Native Linking; it does not add native association files or intent filters.
Configure the native OS association as well as the SDK. Replace YOUR_LINK_DOMAIN and YOUR_PATH_PREFIX with the exact verified host and path prefix from the app profile in your WilderLinks workspace.
<uses-permission android:name="android.permission.INTERNET" />
<activity android:name=".MainActivity" android:exported="true">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="YOUR_LINK_DOMAIN" android:pathPrefix="/YOUR_PATH_PREFIX/" />
</intent-filter>
</activity><key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:YOUR_LINK_DOMAIN</string>
</array>In Xcode, enable the Associated Domains capability and use the same host. In the WilderLinks app profile, configure the Android package name and signing SHA-256 fingerprint, or the iOS bundle ID and Apple Team ID. The matching Android Digital Asset Links and Apple App Site Association files must be available for the host; SDK initialization alone does not establish domain verification.
06 / Security
Keep private credentials server-side
Do not ship organization or private API keys in mobile apps, browser JavaScript, or Unity client builds. Client-side link resolution and authenticated link-management operations have different trust boundaries; keep API-key operations in a trusted server environment.
To create a link in response to an action in your React Native app, send the link details to an endpoint in your own backend using your app’s normal user authentication. That backend must verify the user is allowed to create the link, then call WilderLinks (for example, POST /api/v1/links) with the organization API key held only on the server.
- Your app sends the requested destination and link settings to your backend.
- Your backend authenticates and authorizes the user, then creates the WilderLinks link.
- Your backend returns the generated URL; the app shares or displays it using its platform-appropriate UI.
The React Native SDK’s link-creation and event methods require the organization API key. Do not configure that secret in a distributed app.
These SDKs do not provide your app’s authenticated link-creation backend endpoint; implement that endpoint in your own backend.
07 / Troubleshooting
When a link does not match
- The hook stays without a match if the OS never delivers the URL through React Native Linking.
- init(...) is required before handleIncomingUrl(...); the SDK reports a not-initialized error otherwise.
- A URL host must match one of the configured domains. Use the result matched and error fields to decide whether to route or fall through.
Continue building